@Override
    protected String processLink(IExpressionContext context, String link) {
        if (link == null || !linkInSite(externalUrlSupplier.get(), link)) {
            return link;
        }

        if (StringUtils.isBlank(link)) {
            link = "/";
        }

        if (isAssetsRequest(link)) {
            return PathUtils.combinePath(THEME_PREVIEW_PREFIX, theme.getName(), link);
        }

        // not assets link
        if (theme.isActive()) {
            return link;
        }

        return UriComponentsBuilder.fromUriString(link)
            .queryParam(ThemeContext.THEME_PREVIEW_PARAM_NAME, theme.getName())
            .build().toString();
    }
@Test
    void processAbsoluteLink() {
        ThemeLinkBuilder themeLinkBuilder =
            new ThemeLinkBuilder(getTheme(false), externalUrlSupplier);
        String link = "https://github.com/halo-dev";
        String processed = themeLinkBuilder.processLink(null, link);
        assertThat(processed).isEqualTo(link);

        link = "http://example.com";
        processed = themeLinkBuilder.processLink(null, link);
        assertThat(processed).isEqualTo(link);
    }