The website for Zima Docs. Bulit with Hexo.
You will need Node.js(LTS version recommended),and yarn
Install Hexo
$ npm install -g hexo-cli
$ yarn global add open-cli
Install dependencies:
$ git clone https://github.com/IceWhaleTech/ZimaDocs.git
$ cd ZimaDocs
$ yarn install
Generate:
$ hexo generate
Run server:
$ hexo server
Run editor
$ yarn start
Create a new page:
$ hexo new page <title>
Youtube. You can get youtube video id from youtube video url. https://www.youtube.com/watch?v= DqqY3sDVGKA
{% youtuber video <youtube-video-id> %}
{% endyoutuber %}
Bilibili
{% mmedia "bilibili" "bvid:<video-bvid>" "danmaku:false" %}
Local or internet video
{% mmedia "video" "src:<video-path>" "autoplay:true" %}
tag name: note
tag type: default / primary / success / info / warn / danger
{% note warn <your-note-title> %}
<your-note-body>
{% endnote %}
- open
source/_data/menu.yml
,add a new menu in the original format. - open
themes/zima/languages/en.yml
, add the translation for the new link.
- open
source/_data/sidebar.yml
,add a new link in the original format. - open
themes/zima/languages/en.yml
, add the translation for the new link.
![Specify size](/image/test.jpg?200x200)
![Restricted width](/image/test.jpg?200x)
![Restricted height](/image/test.jpg?x200)
![Specify the ratio](/image/test.jpg?40)
- Please fork the repo first.
- Follow the getting started guide to install the environment and dependencies.
- Clone the forked repo to your local pc.
- Run
hexo server
to preview the site.
# Create a new docs page
hexo new page -p docs/<page name> "<title>"
# hexo new page -p docs/Install-Debian "Install-Debian" will create a new Install-Debian.md in /source/docs
# Create a new faq page
hexo new page -p faq/<page name> "<title>"
# hexo new page -p faq/Install-Debian "Install-Debian" will create a new Install-Debian.md in /source/faq
You can open the /source/docs/Install-Debian.md and use markdown to edit it.
title: Install Debian
---
new content here
If you want add images for new page. You need to create a folder under the /source/images folder with the same name as the page.
title: Install Debian
---
new content here
![Debian-Logo](/images/Install-Debian/logo.png)
- Open the /source/_data/sidebar.yml
- Add your page to the appropriate category.
docs:
...
operating_systems:
...
install_debian: Install-Debian.html # <index-key>: <page-name>.html
...
- Open the /themes/languages/en.yml
- Add new translation to en.yml
...
sidebar:
docs:
...
install_debian: Install Debian # <index-key>: <Final content>
...
After confirming that everything is OK, you can commit your changes to github, and PR them to IceWhaleTech/ZimaDocs.