图像族目录和文件

图像族目录

模块目录可以包含名为 images 的可选族目录。

📂 modules
  📂 ROOT (1)
    📂 images (2)
      📄 image-source-file.ext (3)
    📁 pagesAlian
    📄 nav.adoc
  📂 named-module (4)
    📁 examples
    📂 images (5)
      📄 image-source-file.ext
      📂 subdirectory-of-images (6)
        📄 image-source-file.ext
    📁 pagesAlian
1 根模块目录。
2 图像族目录。Antora 将存储在图像目录中的源文件分类为图像。
3 图像源文件。
4 命名模块目录。
5 图像族目录。
6 图像中的子目录。存储在图像目录的子目录中的源文件被归类为图像。

当生成站点时,Antora 将预设行为应用于存储在图像目录中的源文件。

图像文件

图像是资源,例如照片、图表和屏幕截图。图像的源文件存储在 images 族目录中。Antora 支持PNG、JPG、SVG和GIF(静态和动画)图像文件格式。

无论图像属于哪个组件版本,都可以使用图像的资源 ID 和 AsciiDoc 块图像宏或内联图像宏将图像嵌入到页面或部分中。

Antora 自动发布每个图像文件,除非图像文件被标记为隐藏或缺少文件扩展名。在为图像构建 URL 时,Antora 使用图像文件的族段和相对路径段。

Assets

模块目录还可以包含名为 assets 的目录。这是另一种可选位置,由 Antora 识别,附件和图像族目录可以放置在这里。

📒 repository
  📄 antora.yml
  📂 modules
    📂 ROOT
      📂 assets
        📂 attachments
          📄 attachment-source-file.ext
        📂 images
          📄 image-source-file.ext
      📁 pagesAlian
      📄 nav.adoc

您不需要在页面标题中设置这些预定义目录的路径。这是由 Antora 自动管理的。