项目作者: zerodevx

项目描述 :
Instantly publish API docs from Github docs folder
高级语言:
项目地址: git://github.com/zerodevx/zero-md-docs.git
创建时间: 2020-03-30T08:09:13Z
项目社区:https://github.com/zerodevx/zero-md-docs

开源协议:

下载


zero-md-docs

Instantly publish markdown from Github docs folder

Elegantly leverage on your Github docs folder as a public-facing documentation website. Super easy
to use, barely an inconvenience. Inspired by docsify.

Usage

Structure your docs/ folder like so:

  1. .
  2. └── docs/
  3. ├── readme.md # TOC (navigation menu)
  4. ├── index.html # Copy from template
  5. ├── home.md # ...Site pages
  6. ├── getting-started.md
  7. └── config.md
  8. ...
  9. └── any-other-page.md

Copy index.html

Copy and paste the following code into docs/index.html:

  1. <!-- index.html -->
  2. <!doctype html>
  3. <html lang="en">
  4. <head>
  5. <meta charset="utf-8" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. <!-- Import modules and stylesheet -->
  8. <script type="module" src="https://cdn.jsdelivr.net/npm/zero-md@3?register"></script>
  9. <script type="module" src="https://cdn.jsdelivr.net/npm/zero-md-docs@1"></script>
  10. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/zero-md-docs@1/dist/default.min.css" />
  11. </head>
  12. <body>
  13. <!-- Declare `app` entry point -->
  14. <div id="app"></div>
  15. </body>
  16. </html>

Add readme.md

Create docs/readme.md containing a table of contents (or site links). This acts as the site
navigation menu.

  1. <!-- readme.md -->
  2. - [Home](home.md)
  3. - [Getting Started](getting-started.md)
  4. - [Configuration](config.md)
  5. ...
  6. - [External Link](https://example.com/)

[!NOTE]
The first link is always the home page.

Publish with Github Pages

From your Github repo page, go to Settings -> Pages, set Source to Deploy from a branch, and
set Branch to /docs

  1. ░██████╗░█████╗░██╗░░░██╗███████╗██╗
  2. ██╔════╝██╔══██╗██║░░░██║██╔════╝██║
  3. ╚█████╗░███████║╚██╗░██╔╝█████╗░░██║
  4. ░╚═══██╗██╔══██║░╚████╔╝░██╔══╝░░╚═╝
  5. ██████╔╝██║░░██║░░╚██╔╝░░███████╗██╗
  6. ╚═════╝░╚═╝░░╚═╝░░░╚═╝░░░╚══════╝╚═╝

…and voila - your site is now available at https://<user>.github.io/<repo>/.

License

ISC