5 Star 2 Fork 0

hihopeorg / AutoDispose

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
MAINTAINING_WEBSITE.md 2.00 KB
一键复制 编辑 原始数据 按行查看 历史
Zac Sweers 提交于 2020-06-13 18:13 . Update main refs

Maintaining Documentation Website

The documentation website is built using MkDocs. This requires you to install python to deploy the website. MkDocs supports Python versions 2.7, 3.4, 3.5, 3.6, 3.7.

Overview

The main configuration of the website happens through the mkdocs.yml file. This defines various things like extra css, favicons, icons as well as the main navigation of the website.

Adding a Page

All of the main pages exist in docs directory. To add a new page, simply add a new markdown file to the docs directory. Once that's done, simply add the title of the page and the name of the file in the nav section of mkdocs.yml like so:

nav:
  - 'New Page': new_page.md
    - 'Nested Page': nested_page.md
  -- 'Top Level Page': top_level_page.md

Editing a Page

You can find the markdown file corresponding to the page that you want to edit by checking the mkdocs.yml file and finding the nav section. This should have the markdown file name. You can then find that file in the docs directory. After you've made changes to that file, get them merged in and deploy the website

Adding Custom CSS

You can add your own CSS in the app.css file.

Deploying the website

The website can be deployed by executing the deploy_website.sh script like so:

./deploy_website.sh

The script does the following:

  • Creates a temporary folder.
  • Clones the repository.
  • Runs Dokka.
  • Copies over the files like README.md, CHANGELOG.md, CONTRIBUTING.md etc into the docs folder. This is done because these markdown files are required to be in the GitHub repo and we copy it over so that we don't create duplicates.
  • Deploys mkdocs on gh-pages.
  • Deletes the temporary folder.
Java
1
https://gitee.com/hihopeorg/AutoDispose.git
git@gitee.com:hihopeorg/AutoDispose.git
hihopeorg
AutoDispose
AutoDispose
master

搜索帮助