-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
代码注入功能可否支持Thymeleaf #5922
Comments
如果你指的是系统设置中代码注入功能,该功能面向的是所有页面,不仅仅是文章,所以无法知道具体哪些变量可以使用。 不过你当前的需求可以通过插件实现文章 Head 的处理。具体请参考文档:https://docs.halo.run/developer-guide/plugin/api-reference/server/extension-points/template-head-processor。 /triage needs-information |
Reply to @JohnNiang 指的是,系统设置中代码注入功能。 实际上我目前的需求是暂时通过修改主题的 head 模板来实现了,就是这样不太优雅。 |
有现成的 SEO 插件可以支持你说的功能,或者你可以选择修改主题模板来实现,这里的内容页不仅仅只是说的文章详情还有自定义页面等因此你这样的写法是有问题的 |
此 issue 已不再活跃,我将关闭此 issue。 /close |
@ruibaby: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
你当前使用的版本
2.15.0
描述一下此特性
希望代码注入功能能够支持Thymeleaf,
例如:
在代码注入功能中,为内容页面Head标签添加类似以下代码
<meta property="og:image" th:content="${post.spec.cover}">
前端应当转化为
<meta property="og:image" content="文章封面图片实际地址">
附加信息
No response
The text was updated successfully, but these errors were encountered: