1. Building#
docsify is a static documentation program similar to vuepress and gitbook. However, compared to the others, I personally prefer the style and source code of docsify. I don't want too many additional features, just the ability to write articles and have a table of contents.
Click to view the demo.
Open the terminal and enter the command to set up the local environment:
npm install docsify-cli -g
Initialize the documentation:
docsify init ./docs
Run locally:
docs serve
Then open localhost:3000
in your browser to view it.
2. Pages#
I think the most basic pages are three:
- _navbar.md
Navigation bar
* [About](/)
Then call it in index.html.
window.$docsify = {
...
loadNavbar: true,
...
}
As shown in the image:
- _sidebar.md
Sidebar
* [Building a Documentation with docsify](Building a Documentation with docsify.md)
Call it in index.html.
window.$docsify = {
...
loadSidebar: true,
...
}
As shown in the image:
- README.md
Homepage
## about
Blog address: [https://imhan.cn](https://imhan.cn)
Author: shuxhan
Date: 2021.04.20
This document serves as a backup of the blog articles. If you have any other comments on the articles, you can directly click the link to the original address.
As shown in the image: