asciidoc - Antora 中带有 Supplemental-ui 的自定义 css 不起作用

标签 asciidoc asciidoctor antora

根据UI-supplemental-filesStackoverflow antora-top-navigation-bar-customization我替换了顶部导航 (supplemental-ui/partials/header-content.hbs),但 CSS 的相同功能无法按预期工作。

这是我的文件夹结构,我尝试将背景更改为 #fff 的 footer.css,以及我添加补充文件夹路径的 antora playbook:

enter image description here

页脚背景不会更改为白色。

为什么交换 *.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/

相关文章:

documentation - 如何在 asciidoc 中使用标签包含代码摘录?

asciidoc - 如何使用AsciiDoctor进行自定义类HTML划分?

asciidoc - Asciidoc 标记是否可以编程方式扩展(通过现有实现,如 RST)?

css - Antora supplemental-ui 从 doc.css 中的文档中删除最大宽度

json - Grails 3.2.9:使用Rest的Spring Rest Doc确保了有效负载处理异常:com.fasterxml.jackson.core.JSONParseException

html - 有什么方法可以将 markdown 转换为 asciidoc(或者能够生成相同的 HTML 输出)?

ruby - 如何配置 asciidoctor-gradle-plugin 来处理 plantuml?

asciidoc - 如何动态隐藏asciidoc元素

asciidoc - 如何在 AsciiDoc 中为图形添加空白标题