3.2.9 • Published 1 year ago

gitbook-plugin-embed-file v3.2.9

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

gitbook-plugin-embed-file

修改自:https://github.com/azu/gitbook-plugin-include-codeblock

兼容对docsify内嵌文件的引用方式。

[filename](../_media/example.md ':include')

安装使用

  • book.json 中添加配置
{
  "plugins": [
    "embed-file"
  ]
}
  • 执行安装命令
gitbook install

配置项

optionvalueDescription
template{"default","full","ace",...} or custom pathreindent code if marker or slice is used
unindent{true,false} default:falsereindent code if marker or slice is used
fixlang{true,false} default:falsefix some errors with code lang (e.g C++, ...)
lang{"c_cpp","javascript", ...}lang color syntax (not set => auto deduce, see lang section).
edit{true,false}allow edit code (ace template required)
check{true,false}syntax validation (ace template required)
theme{"monokai","coffee",...}check syntax (ace template required)

book.json中配置,如:

{
    "gitbook": "3.x.x",
    "pluginsConfig": {
        "embed-file": {
            "template": "ace",
            "unindent": true,
            "theme": "monokai"
        }
    }
}