npm i docsify-cli -g
# 建立專案
docsify init ./docs
node_modules/.bin/docsify init ./docs
# 把docs的專案serve起來
docsify serve docs --port 3005
window.$docsify = {
name: '',
repo: '',
loadSidebar: true,
// maxLevel: 4,
subMaxLevel: 2,
alias: {
'/.*/_sidebar.md': '/_sidebar.md'
},
// /* ************************** 全文搜索 ************************** */
search: {
maxAge: 86400000,
paths: 'auto',
noData: 'No Results!',
depth: 2
}
// /* ************************** 全文搜索 ************************** */
}
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
<script src="//unpkg.com/prismjs/components/prism-javascript.js"></script>
增加一個檔案docs/_sidebar.md
* 201903
* [20190320-chmod a+x和chomd +x的結果不一樣,因為umask](/20190320/20190320.md)