转载

MkDocs:根据你的 Markdown 文档生成静态网站

MkDocs is a static site generator that builds modern webpages based on your Markdown documents and configures with a simple YAML file.

Installation

$ pip install mkdocs

ref:

http://www.mkdocs.org/

Configuration

in mkdocs.yml

site_name: Awesome Python site_url: http://awesome-python.com site_description: A curated list of awesome Python frameworks, libraries and software site_author: Vinta Chen repo_url: https://github.com/vinta/awesome-python theme: flatly google_analytics: ['UA-510626-7', 'auto'] pages:   - "Life is short, you need Python.": "index.md"

in docs/CNAME

awesome-python.com

in Makefile

BASEDIR=$(CURDIR) DOCDIR=$(BASEDIR)/docs install:  pip install mkdocs preview:  mkdocs serve deploy:  ln -sf $(BASEDIR)/README.md $(DOCDIR)/index.md  mkdocs gh-deploy --clean 

Usage

# preview $ mkdocs serve  # deploy to GitHub Pages $ mkdocs gh-deploy --clean

ref:

https://help.github.com/categories/github-pages-basics/

https://help.github.com/articles/tips-for-configuring-an-a-record-with-your-dns-provider/

Here is the website which is generated by MkDocs in this port:

http://awesome-python.com/
正文到此结束
Loading...