gitbook没有生成目录
时间: 2023-04-10 15:04:10 浏览: 161
gitbookify:从给定的 Markdown 文件生成 gitbook 章节和章节
可能是因为您没有在 GitBook 的配置文件中设置生成目录的选项。您可以在 book.json 文件中添加以下代码:
```
"plugins": [
"expandable-chapters",
"expandable-sections",
"anchor-navigation-ex",
"splitter",
"tbfed-pagefooter",
"tbfed-gitbook",
"tbfed-navbar",
"tbfed-sidebar",
"tbfed-author",
"tbfed-copy-code",
"tbfed-mermaid",
"tbfed-kroki"
],
"pluginsConfig": {
"anchor-navigation-ex": {
"showLevel": false,
"scrollToTop": true
},
"tbfed-pagefooter": {
"contribute": true,
"contributeText": "Edit This Page",
"github": "https://github.com/username/repo",
"githubText": "GitHub",
"slack": "https://slack.com/username",
"slackText": "Slack",
"twitter": "https://twitter.com/username",
"twitterText": "Twitter",
"wechat": "wechatid",
"wechatText": "WeChat"
},
"tbfed-gitbook": {
"isMulti": false,
"bookName": "GitBook",
"bookLogo": "https://raw.githubusercontent.com/tbfed/tbfed-pagefooter/master/images/gitbook.png",
"bookDescription": "GitBook 是一个基于 Node.js 的命令行工具,可用于创建漂亮的电子书。",
"bookKeywords": "GitBook, Node.js, 电子书",
"bookLanguage": "zh-hans",
"bookDirection": "ltr",
"bookRepository": "https://github.com/GitbookIO/gitbook.git",
"bookHomepage": "https://www.gitbook.com/",
"bookLicense": "MIT",
"bookVersion": "3.2.3",
"bookAuthor": "GitBook",
"bookContributors": [
{
"name": "Tommy Lau",
"email": "tommy@tbfed.com",
"url": "https://www.tbfed.com/"
}
]
},
"tbfed-navbar": {
"websiteName": "GitBook",
"websiteLogo": "https://raw.githubusercontent.com/tbfed/tbfed-pagefooter/master/images/gitbook.png",
"fixed": true,
"links": [
{
"text": "Home",
"link": "https://www.gitbook.com/"
},
{
"text": "Docs",
"link": "https://docs.gitbook.com/"
},
{
"text": "Blog",
"link": "https://www.gitbook.com/blog/"
},
{
"text": "Community",
"link": "https://www.gitbook.com/community"
}
]
},
"tbfed-sidebar": {
"isMulti": false,
"intro": "GitBook 是一个基于 Node.js 的命令行工具,可用于创建漂亮的电子书。",
"navs": [
{
"name": "Getting Started",
"link": "/getting-started.html",
"icon": "fa fa-rocket",
"subs": [
{
"name": "Introduction",
"link": "/getting-started/introduction.html"
},
{
"name": "Installation",
"link": "/getting-started/installation.html"
},
{
"name": "Usage",
"link": "/getting-started/usage.html"
}
]
},
{
"name": "Configuration",
"link": "/configuration.html",
"icon": "fa fa-cog",
"subs": [
{
"name": "Basic",
"link": "/configuration/basic.html"
},
{
"name": "Advanced",
"link": "/configuration/advanced.html"
}
]
},
{
"name": "Plugins",
"link": "/plugins.html",
"icon": "fa fa-plug",
"subs": [
{
"name": "Official Plugins",
"link": "/plugins/official-plugins.html"
},
{
"name": "Third-party Plugins",
"link": "/plugins/third-party-plugins.html"
}
]
},
{
"name": "Themes",
"link": "/themes.html",
"icon": "fa fa-paint-brush",
"subs": [
{
"name": "Official Themes",
"link": "/themes/official-themes.html"
},
{
"name": "Third-party Themes",
"link": "/themes/third-party-themes.html"
}
]
}
]
},
"tbfed-author": {
"name": "GitBook",
"email": "support@gitbook.com",
"url": "https://www.gitbook.com/"
},
"tbfed-copy-code": {
"buttonText": "Copy",
"color": "#ffffff",
"bgColor": "#4d4d4d",
"notifyText": "Copied!",
"time": 1000
},
"tbfed-mermaid": {
"theme": "default"
},
"tbfed-kroki": {
"url": "https://kroki.io",
"diagrams": [
"blockdiag",
"seqdiag",
"actdiag",
"nwdiag",
"rackdiag",
"packetdiag",
"erd",
"plantuml",
"umlet",
"vega",
"vegalite",
"wavedrom",
"nomnoml",
"svgbob"
]
}
}
```
然后重新生成您的 GitBook 即可看到目录。
阅读全文