All Posts Tagged “github”

Use MkDocs to deploy your Markdown documents on GitHub Pages

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

ref:
http://www.mkdocs.org/

Installation

$ pip install mkdocs

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 post:
http://awesome-python.com/