Git Product home page Git Product logo

cryptape.github.io's Introduction

Nervos Docs

docs.nervos.org is the documentation website for all the Nervos Network related components. This repository is working as both the front page of Nervos Docs and an example for building other Nervos related docs.

How to Make Another Nervos Document Website in Your Project Repo

We use Docsify & Github Page

Nervos Documentents are using an easy generated document site framework Docsify. It's an awesome project and we really appreciate the the contributor of this project.

Document files are written in Markdown language.

We use github page for hosting our document sites. On the one hand it enables the realtime updating, version control and online editing; on the other hand, their server are much more relible than ours. After all they are actually Microsoft now.

How to Orgnize the Files

Necessary Files for Docsify

index.html is the only HTML file needed. It includes the settings for version and language features, but right now they are NOT official feature, so if you need to use these two features you might need to find me in person.

script/ folder has the configuration files.

.nojekyll prevents GitHub Pages from ignoring files that begin with an underscore '_'.

_sidebar.md are configurations for side bar. Its effective range are their current folder and all the subfolders.

Your Document Files

All the doc files should be along with the project codes and files, inside of the project repo. You can choose either the repo-name/docs folder for storing your docs, or the gh-pages branch, due to the setting limitation of GitHub Page.

Docs go with codes can make sure two things: every version of codes have the corresponding version of doc; reviewer can know if one changed code without chaging the doc.

The repo-name/docs or gh-pages branch should be organized in a structure like this:

.
├── zh-CN (language)
    ├── V0.0.1 (version)
        ├── first.md
        ├── second.md
        └── third.md
    └── V0.0.2 (version)
        ├── first.md
        ├── second.md
        └── third.md

If you want to link to one of the markdown files, the path would be something like: [First Markdown](first)

Sidebar Files

You can learn how do it by just simply refering the _sidebar.md file in this repo(Nervos-Docs) as an example. I don really wanna explain it and I believe you can figure it out yourself. ;)

How to make the website

Install docsify-cli.

yarn global add docsify-cli

If you havn't use yarn before, please refer here (https://yarnpkg.com/lang/en/docs/install/).

Get the necessary site files.

git clone https://github.com/cryptape/Nervos-Docs.git

Do some customizations by configuring the script/customization-seting.js and script/customization-value.js.

Then run this command to start the document site service.

docsify serve

Open your browser and enter http://localhost:3000/ to preview your document site.

How to put it on Github Page

Upgrade it to your project repo, in the repo-name/docs folder on master branch or gh-pages branch.

Enable the GitHub page in your repo setting.

Done and check it out!

Localization (Translation)

We are still experimenting how to do the localization for all project effectively.

FAQ

1. My sidebar file doesn't load correctly.

You may find your site works fine on your local machine but missing the sidebar when it's on GitHub page. This is because GitHub Pages ignores all the files started with _ by default. Adding an empty file named .nojekyll to your /docs folder can turn this setting off.

cryptape.github.io's People

Contributors

mine77 avatar zengbing15 avatar cipherwang avatar zhouyun-zoe avatar

Watchers

jarvis.bit avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.