根据UI-supplemental-files和 Stackoverflow antora-top-navigation-bar-customization我替换了顶部导航 (supplemental-ui/partials/header-content.hbs
),但 CSS 的相同功能无法按预期工作。
这是我的文件夹结构,我尝试将背景更改为 #fff 的 footer.css
,以及我添加补充文件夹路径的 antora playbook:
页脚背景不会更改为白色。
为什么交换 *.hbs 文件有效但 *.css 无效?有什么建议吗?
编辑:这是我的footer-content.hbs
:
<footer class="footer">
<p>This page was built using the Antora default UI.</p>
<p>The source code for this UI is licensed under the terms of the MPL-2.0 license.</p>
</footer>
最佳答案
您应该在“head-styles.hbs”模板中注册自定义 CSS 文件。
<link rel="stylesheet" href="{{{uiRootPath}}}/css/site.css">
<link rel="stylesheet" href="{{{uiRootPath}}}/css/footer.css">
关于asciidoc - Antora 中带有 Supplemental-ui 的自定义 css 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/75920869/