【问题标题】:GitBook does not copy imagesGitBook 不复制图像
【发布时间】:2019-02-05 03:12:47
【问题描述】:

我有一个使用 GitBook 的项目:https://github.com/akauppi/plantuml-book

它从 PlantUML 源生成图像。出于某种原因,这些图像不会被复制到 GitBook 的 _book 文件夹中,因此不会将其放入书中。

预期:

GitBook 会注意到图像引用,例如

![](./hello.svg)

..并将这些图像文件复制到正确的位置(在本例中为 `_book/chapter1/hello.svg)。

实际:

$ tree _book/chapter1/
_book/chapter1/
└── DIAGRAMS.html

那里没有图像。 :(

注意:我没有将此作为 GitBook 问题,因为该项目似乎已经死了 (link)。

【问题讨论】:

    标签: gitbook


    【解决方案1】:

    问题是我的.gitignore 包含了生成的 *.svg 和 *.png 文件,而 GitBook 会自动忽略 .gitignore 中的所有内容。

    解决方案:these lines in .bookignore

    # Bring in the generated files (having them in .gitignore would otherwise leave them out)
    !*.svg
    !*.png
    

    【讨论】:

      猜你喜欢
      • 2015-02-16
      • 2023-02-14
      • 1970-01-01
      • 2020-12-16
      • 2013-09-23
      • 1970-01-01
      • 2022-07-07
      • 2023-03-25
      • 1970-01-01
      相关资源
      最近更新 更多