asciidoc - 如何在asciidoc上添加样式表CDN?

标签 asciidoc asciidoctor spring-restdocs

可以在 AsciiDoc 中执行此操作吗?我尝试使用 bootstrap CSS 对其进行样式化:

:stylesheet:
https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css

最佳答案

属性:stylesheet:仅适用于本地文件。

您可以编写本地 CSS style.css,然后将其包含在您的 doc.adoc 中,如下所示。

// style.css
@import "https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css";
// doc.adoc
:stylesheet: style.css

为了使结果看起来更漂亮,您仍然需要编写更多 CSS 来匹配 Asciidoctor HTML 输出使用的类。

以下页面可能对您有帮助:https://asciidoctor.org/docs/produce-custom-themes-using-asciidoctor-stylesheet-factory/

关于asciidoc - 如何在asciidoc上添加样式表CDN?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59960256/

相关文章:

asciidoc - 如何防止图像在 asciidoctor 中重置有序列表编号

asciidoc - 不在标题页之后立即放置目录

java - 如何使用有条件地返回响应的 Spring REST Docs 记录 REST 服务?

java - 带有 spring-restdocs 2.0.2.RELEASE 的空指针(带有 Restassured)

html - Asciidoctor 图像是图像的链接

asciidoc - 如何查看asciidoc的渲染结果

java - 如何将 Maven 变量传递给 asciidoctor-maven-plugin?

SpringRestDoc SnippetException : Fields with the following paths were not found in the payload:

templates - 如何在 hugo go 模板中使用 asciidocify 而不是 markdownify?

pdf - 生成的 pdf 中未呈现警告图标