当前位置:网站首页>[docsify basic use]
[docsify basic use]
2022-06-30 06:57:00 【Little blue man_ nino】
docsify Basic use
One 、 Initialize project
1.1、 Global installation docsify-cli Tools
npm i docsify-cli -g
1.2、 Initialize the document structure
Create a local folder first docs, And then execute the command
docsify init ./docs
The following directory will be generated
-| docs
-| .nojekyll Used to stop Github Pages Files that start with a sliding line are ignored
-| index.html Entrance file
-| README.md Render as home page content
1.3、 Local live preview
docsify serve docs
Default access http://localhost:3000
1. README.md file

2. Preview effect :

Two 、 Customize the navigation bar and sidebar
2.1、script To configure
<script>
window.$docsify = {
name: '',
repo: '',
loadNavbar: true,
loadSidebar: true,
maxLevel: 2,
subMaxLevel: 4,
mergeNvabar: true
}
</script>
1. add to ***_sidebar.md*** File to configure the sidebar
* DOCSIFY Learning notes
* [ One 、 Initialize project ](docsifyUsage/docsifyUsageChapter1.md)
* [ Two 、 Sidebar configuration ](docsifyUsage//docsifyUsageChapter2.md)
2. add to ***_navbar.md*** File to configure the top navigation bar
* Project address
* [GitHub Address ](https://github.com/arenxiaolanz/docsify_study)
* [Gitee Address ](https://gitee.com/ren-nino/docsify_study)
* more
* [ Blog home page ](http://blog.renorchid.xyz/)
3. See the effect

3、 ... and 、 Customize the cover page
1. At the entrance file index.html Add the configuration of the cover page in
<script>
window.$docsify = {
coverpage: true
}
</script>
2. add to _coverpage.md File configuration cover page
<!-- _coverpage.md -->

# my docsify Learning notes <small>1.0.0</small>
> To be proficient in industry and to be idle in play , To do is to think, to do is to follow .
- Simple , Lightweight
- No need to build static htnl file
- Multiple themes
[GitHub](https://github.com/docsifyjs/docsify/)
[Get Started](#docsifyUsage/docsifyUsageChapter1)
3. Check out the cover effect

Four 、 Add full text search
1. Add the configuration of full-text search in the portal file
<script>
window.$docsify = {
search: {
maxAge: 86400000, // Expiration time , Unit millisecond , Default one day
placeholder: 'Type to search',
noData: 'No Results!',
// Maximum level of search title , 1 - 6
depth: 4,
hideOtherSidebarContent: false, // Whether to hide other sidebar content
}
}
</script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script>
2. View search results

5、 ... and 、 Add code highlights
1. Add the following code to the portal file
<script src="//cdn.jsdelivr.net/npm/[email protected]/components/prism-bash.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/[email protected]/components/prism-php.min.js"></script>
6、 ... and 、 Add one click Copy code
1. Add the following code to the portal file
<script src="//cdn.jsdelivr.net/npm/docsify-copy-code/dist/docsify-copy-code.min.js"></script>
7、 ... and 、 stay GitHub The document above
1. Submit code to GitHub

2.GitHub Pages Deploy

3. Deployment success ·
Access link :https://arenxiaolanz.github.io/docsify_study/
8、 ... and 、tips, Upload updates
git init
git remote remove origin
git remote add origin [email protected]:arenxiaolanz/docsify_study.git
git add .
git commit -m "completed"
git push -u origin master
边栏推荐
- InnoDB engine in MySQL
- 银河麒麟初体验
- 1.5 - 逻辑运算
- Huawei full-scale Daniel shared the 598 page full-color Manual of network protocols for the first time
- [fuzzy neural network] mobile robot path planning based on Fuzzy Neural Network
- What if I forget my account number after opening an account? Is it safe to open an account online?
- Several C language implementations
- Is Huatai stock trading safe? I want to open an account online.
- 【转】存储器结构、cache、DMA架构分析
- [transfer] analysis of memory structure, cache and DMA architecture
猜你喜欢
随机推荐
Basic fragmentary thoughts
What if I forget my account number after opening an account? Is it safe to open an account online?
KEIL - 下载调试出现“TRACE HW not present”
Practice summary of Prometheus project in amu Laboratory
[transfer] analysis of memory structure, cache and DMA architecture
Ls1028 manual
0 basic job transfer software test, how to achieve a monthly salary of 9.5k+
明天!“移动云杯”大赛空宣会开播!
ROS system problem: rosdep init
Introduction to programming ape (11) -- structure
元宇宙由哪些底层技术支撑?
1.6 - CPU composition
NFS mount
Assembly language learning I (with stack co process, 32-bit registers and related instructions, to be continued 06/29)
freemarker
1.2(补充)
C # - C # process and convert pixeldata of CT images with fo DICOM
How to convert XML to JSON
Joseph problem C language
RT thread migration to s5p4418 (III): static memory pool management









