当前位置:网站首页>Docsify building a personal minimalist knowledge warehouse
Docsify building a personal minimalist knowledge warehouse
2022-07-01 00:33:00 【Life has light】
、 Directory map

docsify Minimalist knowledge base
Personal blog may be everyone's experience " Blog dream ", Building an exclusive personal blog should also be a necessary skill for a development enthusiast , Of course, now blog one click deployment 、 We don't have to write the theme by ourselves , for example Hexo、WordProcess Only one server is needed 、 One computer can complete the cool blog theme page , I prefer minimalist style for blog pages , So I found a fun blog tool docsify A magical document website generator .
Let's first look at the effect of this tool , Hang out often B The little friend of the station should know CodeSheep Program sheep is a full stack walker , The program sheep teacher's personal self-study website uses docsify Tools to build , Take a general look at the layout of the teacher .
The teacher's content is very rich , It is worth collecting , Of course, here we don't just look at the teacher's web page , We try to imitate him !
docsify Build a personal minimalist knowledge warehouse
1.1、 Officially set up
- open docsify Official website :https://docsify.js.org/

- Following steps , Please make sure our computer has node.js Environmental Science

- First installation docsify-cli The scaffold

- Create an empty folder on your computer , Used to initialize the project , That is, it will be used to store our blog files in the future

- After initializing the project , Let's go into the folder , You can see the following files
index.htmlEntrance fileREADME.MDIt will be used as the main page content rendering.nojekyllUsed to stop GitHub Pages Ignore files that start with an underline

- Start the local server


1.2、 Custom page
Default Demo The page is monotonous , If we want to modify this page , Just modify the README.md, Grammar is MarkDown grammar

Of course, I just write casually , You can put your md Paste notes in .
1.3、 Multi page document
If we want to create multiple pages , Or websites that need multi-level routing , stay docsify It can also be easily implemented in .

We refer to official documents , For example, I create two folders here GO、Java, It's stored separately README.md file

We want to visit Java Under folder README.md file , Just follow the URL java/

1.4、 Custom sidebar
It is not convenient for us to input the above multi page documents on the website , It's best to have a sidebar . We refer to official documents

- First, in the index.html To configure , Add rules according to official documents
<!-- index.html -->
<script> window.$docsify = {
loadSidebar: true } </script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
- Then create... In the root directory
_sidebar.md, Edit as follows
* [java](java/)
* [Go](Go/)
- The effect is as follows

Of course, there are many nested sidebars in official documents 、 Catalog 、 Subtitles, etc , There is no record here , The operation methods are similar
1.5、 Open the cover

- To configure index.html file
<!-- index.html -->
<script> window.$docsify = {
coverpage: true } </script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
- Root creation
_coverpage.mdfile
# docsify <small>3.5</small>
> A magical document website generator .
- Simple 、 Light ( After the compression ~21kB)
- No need to generate html file
- Numerous themes
[GitHub](https://github.com/docsifyjs/docsify/)
[Get Started](#docsify)
So the cover is ready !

1.6、 Replace the topic
If we want to change the theme , It only needs Replace index.html in css Style file is OK

For example, I change to dark.css

1.7、 Full text search plug-in
Our general blog site will have a search box ,docsify Help us provide such a plug-in .

- stay index.html To configure
<script> window.$docsify = {
search: 'auto', // The default value is // Complete configuration parameters search: {
maxAge: 86400000,// Expiration time , Unit millisecond , Default one day paths: [], // or 'auto' placeholder: ' Please enter search keywords ', noData: ' I didn't find it !', depth:2 } } </script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script>
- The effect is as follows

1.8、 Word count plug-in

- stay index.html Add js
<script src="//unpkg.com/docsify-count/dist/countable.js"></script>
- stay index.html Middle configuration
window.$docsify = {
count:{
countable:true,
fontsize:'0.9em',
color:'rgb(90,90,90)',
language:'chinese'
}
}

1.9、 Deployment project
Of course docsify There are other interesting plug-ins , I won't take more notes here , Official documents have records . Now what we need to do is to deploy our project to the server for other small partners to access . You can use GitHub pages perhaps Gitee pages, Of course, we can also use cloud servers , I'll use it here Gitee pages Deploy
- Get into Gitee

- Fill in the warehouse information

- Just initialized docsify Open under the path of document warehouse git, Input
git init

- Then the input
git add ., Add all files - Then the input
git commit -m "first commit", So our local warehouse will be built - Next, we just need to push it to the remote warehouse , Input
git remoteView all remote hosts

If it is not shown in the above figure, there is no remote host , Just follow gitee Prompt for commands


As shown in the figure above, the push is successful , We click on Gitee pages

You can only open it after you use your real name Gitee pages apply , The real name information generally needs one working day to be reviewed , Then select start .


After launching, we can get a website , You can visit this website , We send it to other small partners , Other small partners can also visit !
1.10、 Update project
Tip: The update project needs to be redeployed Gitee Pages, So it's really troublesome , Time will be recorded later Nginx Server driven deployment .
Time flies!
边栏推荐
- leetcode 474. Ones and Zeroes 一和零(中等)
- 20220215 CTF misc buuctf Xiaoming's safe binwalk analysis DD command separate rar file archpr brute force password cracking
- Vmware16 installing win11 virtual machine (the most complete step + stepping on the pit)
- 网上开华泰证券的股票账户是否安全呢?
- 2022-2028 global ICT test probe industry research and trend analysis report
- 2022-2028 global rotary transmission system industry research and trend analysis report
- Operation record of reinitialization instance of Dameng database
- Tide - rust web framework based on async STD
- Which is better, server rental or hosting services in the United States?
- File reading and writing for rust file system processing - rust Practice Guide
猜你喜欢

Bridge emqx cloud data to AWS IOT through the public network

Development of wireless U-shaped ultrasonic electric toothbrush

How does the VR cloud exhibition hall bring vitality to offline entities? What are the functions?

20220215 misc buctf easycap Wireshark tracks TCP flow hidden key (use of WinHex tool)

2022-2028 global PTFE lined valve industry research and trend analysis report

VR panorama adds contrast function to make the display of differentiation effect more intuitive!

2022-2028 global ethylene oxide scrubber industry research and trend analysis report

What is SRM system and how to standardize the internal procurement process of the company

To tell you the truth, ThreadLocal is really not an advanced thing

Which is better, server rental or hosting services in the United States?
随机推荐
Pycharm useful shortcut keys
What is the fastest way to import data from HDFS to Clickhouse? Spark is imported through JDBC or HDFS
76 page comprehensive solution 2022 for smart Logistics Park (download attached)
1175. Disposition des nombres premiers / échange de doigts II 104. Nombre de permutations
CSDN常用复杂公式模板记录
On the application of cluster analysis in work
2022-2028 global PTFE lined valve industry research and trend analysis report
Deployment of mini version message queue based on redis6.0
2022-2028 global ICT test probe industry research and trend analysis report
高等数学建模
网上开华泰证券的股票账户是否安全呢?
20220216 misc buuctf backdoor killing (d shield scanning) - clues in the packet (Base64 to image)
C /platform:anycpu32bitpererrored can only be used with /t:exe, /t:winexe and /t:appcontainerexe
需求评审,测试人员应该发挥怎样的价值?两分钟让你不再懵逼
What does it mean to open an account online? Is it safe to open an account online?
Plot size and resolution with R markdown, knitr, pandoc, beamer
When is it appropriate to replace a virtual machine with a virtual machine?
Ybtoj exchange game [tree chain splitting, line segment tree merging]
Excuse me, does Flink support synchronizing data to sqlserver
Mysql database query optimization