折腾:
奇迹,已经新建了book.json,也已经:
现在希望:
添加多章节,把之前的内容,整理成多个章节的内容。
最好每个章节,最顶级,一级,也带编号
看到别人提到,好像是需要:
book拆分为多个部分part
参考:
试试多个PART的做法。
后记:
可以参考:
Pages and Summary · GitBook Toolchain Documentation
# Summary
### Part I
* [Introduction](README.md)
* [Writing is nice](part1/writing.md)
* [GitBook is nice](part1/gitbook.md)
### Part II
* [We love feedback](part2/feedback_please.md)
* [Better tools for authors](part2/better_tools.md)
<span style="font-size: 12px; background-color: rgb(251, 250, 248); color: rgb(51, 51, 51); font-family: Monaco;"–<–
* [Last part without title](part3/title.md)
gitbook multiple chapter
貌似起到我要的反的效果了?
Directory structure · GitBook Toolchain Documentation
Pages and Summary · GitBook Toolchain Documentation
Chapters and Subchapters | GitBook.com Documentation
【总结】
然后用如下代码,实现了分多个章节,且第一级章节都可以显示章节编号:
# HTTP知识总结
* [前言](README.md)
<!– ### HTTP简介 –>
* [HTTP简介](http_intro/README.md)
* [HTTP学习目的](http_intro/ch1_http_learn_purpose.md)
* [HTTP简介](http_intro/ch2_http_intro.md)
* [HTTP内部流程](http_intro/ch3_http_internal_process.md)
* [HTTP基本逻辑总结](http_intro/ch4_http_basic_logic.md)
<!– ### HTTP详解 –>
* [HTTP详解](http_detail/README.md)
* [HTTP的典型结构](http_detail/ch1_http_structure.md)
* [HTTP的Header头](http_detail/ch2_http_header.md)
* [HTTP的请求参数和编码](http_detail/ch3_http_req_param_encode.md)
* [HTTP的响应的状态码](http_detail/ch4_http_resp_status_code.md)
* [HTTP的响应数据格式JSON](http_detail/ch5_http_resp_data_format_json.md)
<!– ### HTTP相关 –>
* [HTTP相关](http_related/README.md)
* [HTTP的工具和库](http_related/ch1_http_tool_lib.md)
* [HTTP的后台API设计](http_related/ch2_http_api_design.md)
* [HTTP相关心得](http_related/ch3_http_note_summary.md)
<!– ### 附录 –>
* [参考资料](reference.md)
效果是:
然后再去换用:
# HTTP知识总结
### 前言
* [前言](README.md)
### HTTP简介
* [HTTP简介](http_intro/README.md)
* [HTTP学习目的](http_intro/ch1_http_learn_purpose.md)
* [HTTP简介](http_intro/ch2_http_intro.md)
* [HTTP内部流程](http_intro/ch3_http_internal_process.md)
* [HTTP基本逻辑总结](http_intro/ch4_http_basic_logic.md)
### HTTP详解
* [HTTP详解](http_detail/README.md)
* [HTTP的典型结构](http_detail/ch1_http_structure.md)
* [HTTP的Header头](http_detail/ch2_http_header.md)
* [HTTP的请求参数和编码](http_detail/ch3_http_req_param_encode.md)
* [HTTP的响应的状态码](http_detail/ch4_http_resp_status_code.md)
* [HTTP的响应数据格式JSON](http_detail/ch5_http_resp_data_format_json.md)
### HTTP相关
* [HTTP相关](http_related/README.md)
* [HTTP的工具和库](http_related/ch1_http_tool_lib.md)
* [HTTP的后台API设计](http_related/ch2_http_api_design.md)
* [HTTP相关心得](http_related/ch3_http_note_summary.md)
### 附录
* [参考资料](reference.md)
效果是:
但是发现个问题:
比如2.1的HTTP简介,其实是希望是
2 HTTP简介,作为第二章的介绍的
但是用,看起来和别人一样的配置:
# Summary
<!– ## 前言 –>
* [前言](README.md)
<!– ## HTTP简介 –>
* [HTTP简介](http_intro/README.md)
* [HTTP学习目的](http_intro/ch1_http_learn_purpose.md)
* [HTTP简介](http_intro/ch2_http_intro.md)
* [HTTP内部流程](http_intro/ch3_http_internal_process.md)
* [HTTP基本逻辑总结](http_intro/ch4_http_basic_logic.md)
<!– ## HTTP详解 –>
* [HTTP详解](http_detail/README.md)
* [HTTP的典型结构](http_detail/ch1_http_structure.md)
* [HTTP的Header头](http_detail/ch2_http_header.md)
* [HTTP的请求参数和编码](http_detail/ch3_http_req_param_encode.md)
* [HTTP的响应的状态码](http_detail/ch4_http_resp_status_code.md)
* [HTTP的响应数据格式JSON](http_detail/ch5_http_resp_data_format_json.md)
<!– ## HTTP相关 –>
* [HTTP相关](http_related/README.md)
* [HTTP的工具和库](http_related/ch1_http_tool_lib.md)
* [HTTP的后台API设计](http_related/ch2_http_api_design.md)
* [HTTP相关心得](http_related/ch3_http_note_summary.md)
<!– ## 附录 –>
* [参考资料](reference.md)
结果却还是带1.1 2.1之类的编号:
而不是别人的 1 2 3 4
配置改为:
“pluginsConfig”: {
“theme-default”: {
“showLevel”: false
}
}
结果:
又没有编号了:
gitbook summary index number
Don’t set main README.md file as ‘introduction’ on the index · Issue #476 · GitbookIO/gitbook
Set starting number on Summary · Issue #915 · GitbookIO/gitbook
GitBook使用 – Wiki | Tsong khapa
用:
# HTTP知识总结
* [前言](README.md)
* [HTTP简介](http_intro/README.md)
* [HTTP学习目的](http_intro/ch1_http_learn_purpose.md)
* [HTTP简介](http_intro/ch2_http_intro.md)
* [HTTP内部流程](http_intro/ch3_http_internal_process.md)
* [HTTP基本逻辑总结](http_intro/ch4_http_basic_logic.md)
* [HTTP详解](http_detail/README.md)
* [HTTP的典型结构](http_detail/ch1_http_structure.md)
* [HTTP的Header头](http_detail/ch2_http_header.md)
* [HTTP的请求参数和编码](http_detail/ch3_http_req_param_encode.md)
* [HTTP的响应的状态码](http_detail/ch4_http_resp_status_code.md)
* [HTTP的响应数据格式JSON](http_detail/ch5_http_resp_data_format_json.md)
* [HTTP相关](http_related/README.md)
* [HTTP的工具和库](http_related/ch1_http_tool_lib.md)
* [HTTP的后台API设计](http_related/ch2_http_api_design.md)
* [HTTP相关心得](http_related/ch3_http_note_summary.md)
* [参考资料](reference.md)
效果是:
都是1开始的。
gitbook 章节编号
在gitbook中实现多级导航栏的支持 | Sky’s Blog
-》
好像是插件实现这个效果的。
gitbook 章节编号 取消 1.1 2.1
gitbook 多级目录编号
(1)gitbook如何可以创建多级目录? – techstay的回答 – SegmentFault
总之:
我这里是设置了希望的格式,但是编号还是不正常,还是:
1.1
1.2
1.3
而不是
1
2
3
gitbook article index number
gitbook chapter number
unnumbered items in the table of contents? · Issue #810 · GitbookIO/gitbook
Group chapters into “parts” or “books” · Issue #306 · GitbookIO/gitbook
numbered-headings | GitBook Plugins
去试试numbered-headings
book.json中配置:
“plugins”: [
“-search”,
“multipart”,
“numbered-headings”
],
安装:
Error: Couldn’t locate plugins “numbered-headings”, Run ‘gitbook install’ to install plugins from registry.
➜ htttp_summary git:(master) ✗ gitbook install
info: installing 2 plugins using [email protected]
info:
info: installing plugin “multipart”
info: install plugin “multipart” (*) from NPM with version 0.3.0
info: >> plugin “multipart” installed with success
info:
info: installing plugin “numbered-headings”
info: install plugin “numbered-headings” (*) from NPM with version 1.1.1
/Users/crifan/GitBook/Library/Import/htttp_summary
info: >> plugin “numbered-headings” installed with success
Gitbook TOC Numbering discrepancy – Stack Overflow
【总结】
最终,目前还是没办法去掉最开始的1.的章节的编号的前缀,只能是:
1.1
1.2
1.3
去用了
代码:
# HTTP知识总结
<!– ## 前言 –>
* [前言](README.md)
<!– ## PART I –>
* [HTTP简介](http_intro/README.md)
* [HTTP学习目的](http_intro/ch1_http_learn_purpose.md)
* [HTTP简介](http_intro/ch2_http_intro.md)
* [HTTP内部流程](http_intro/ch3_http_internal_process.md)
* [HTTP基本逻辑总结](http_intro/ch4_http_basic_logic.md)
<!– ## PART II –>
* [HTTP详解](http_detail/README.md)
* [HTTP的典型结构](http_detail/ch1_http_structure.md)
* [HTTP的Header头](http_detail/ch2_http_header.md)
* [HTTP的请求参数和编码](http_detail/ch3_http_req_param_encode.md)
* [HTTP的响应的状态码](http_detail/ch4_http_resp_status_code.md)
* [HTTP的响应数据格式JSON](http_detail/ch5_http_resp_data_format_json.md)
<!– ## HTTP相关 –>
* [HTTP相关](http_related/README.md)
* [HTTP的工具和库](http_related/ch1_http_tool_lib.md)
* [HTTP的后台API设计](http_related/ch2_http_api_design.md)
* [HTTP相关心得](http_related/ch3_http_note_summary.md)
<!– ## 附录 –>
* [参考资料](reference.md)
效果:
转载请注明:在路上 » 【部分解决】Gitbook中添加多章节且希望一级章节也显示编号