Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议为静态资源添加版本号参数 #19

Closed
ruibaby opened this issue Jan 16, 2024 · 0 comments
Closed

建议为静态资源添加版本号参数 #19

ruibaby opened this issue Jan 16, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@ruibaby
Copy link
Contributor

ruibaby commented Jan 16, 2024

RT,建议为静态资源添加版本号参数,用于在升级后更新资源缓存。

public static String basicScript(RenderConfig renderConfig) {
return """
<link rel="stylesheet" type="text/css" href="/plugins/vditor-mde/assets/static/dist/index.css" id="vditor-style" />
<script src="/plugins/vditor-mde/assets/static/dist/method.min.js"></script>
<script src="/plugins/vditor-mde/assets/static/render.js" id="vditor-render"
data-dark="%s" data-mediaRender="%s"></script>
""".formatted(renderConfig.getDarkMode(), renderConfig.getMediaRender());
}

可以参考:https://github.com/halo-dev/plugin-search-widget/blob/7390bfa4d6c436dd44dc00b1ef4c80de98f2899e/src/main/java/run/halo/search/widget/SearchWidgetHeadProcessor.java#L37

@justice2001 justice2001 added the enhancement New feature or request label Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants