Static wiki is a client side wiki for pure markdown. All you need is a simple file server(Github Pages is enough) to serve files and a browser to actually view.
- Now you can write your documents in markdown and never have to worry about it anymore.
- If you use Github Pages, you can turn github into your own personal wiki with some simple configurations.
- copy
index.html
,css/
,main.js
into your wiki directory. - Create file
index.md
if not exist. This will be your home page. - Start a file server under your wiki directory.
How to start a file server? Take http-server as an example:
npm install -g http-server
cd your-wiki-directory
http-server
Change Default Home Page:
- open
main.js
with your favorite editor. - change
index.md
invar file_index = 'index.md';
to whatever you like.
Search
In order to provide search function, static-wiki
will actually download
every markdown file behind the scene. However, static-wiki
have no idea what
files are contained in your wiki, so you need to add file all.txt
in your
wiki with all the markdown file names(line by line) like:
index.md
README.md
Further Configuration
Well, it is written in HTML/CSS/Javascript, modify as you wish.
Github Pages provide hosts of static file for project wikis. Which in our case is the perfect tool for serving files. I won't go into the details of using Github pages, please read the corresponding documents.
Here is my workflow.
- Publish my wiki(markdown files and static-wiki files) to branch
gh-pages
to enable Github pages. Now our wiki is up. - Whenever I want to edit something, I directly edit it on Github, Done.