Welcome to MkDocs¶
For full documentation visit mkdocs.org.
Commands¶
mkdocs new [dir-name]- Create a new project.mkdocs serve- Start the live-reloading docs server.mkdocs build- Build the documentation site.mkdocs -h- Print help message and exit.
Project layout¶
mkdocs.yml # The configuration file.
docs/
index.md # The documentation homepage.
... # Other markdown pages, images and other files.
notes-hi repo template¶
new repo¶
-
clone notes-hi as a template
# clone notes-hi as a template git clone https://github.com/hedzr/notes-hi.git new-repo cd new-repo git push [email protected]:yourname/new-repo.git +master:master -
clone the
new-repoto your working directory:# in the working directory of your new-repo cd ~/work git clone [email protected]:yourname/new-repo.git cd new-repo -
publish as gh-pages:
- via
build.sh:# ./build.sh prepare_gh_pages_branch git checkout --orphan gh-pages rm -rf * .gitignore docs site 2>/dev/null touch README.md && git add . && git commit -m 'initial gh-pages commit' && git push origin gh-pages git checkout master && \ git branch -D gh-pages && \ git subtree add --prefix=site origin gh-pages #rm -rf site 2>/dev/null #git subtree add --prefix=site origin gh-pagesIf error occurs at
git subtree add ...:prefix 'site' already exists, try this:git subtree split --rejoin --prefix=site origin gh-pages - via mkdocs gh-deploy
mkdocs gh-deploy