This is a template repo you can use for documentation. It uses mkdocs with the material theme.
-
Create a new private repo on GitHub for your documentation.
-
Clone this repo to your workstation.
git clone https://github.com/joyent/mkdocs-template my-team-docs
-
Set the remote to the new repo you created in step 1.
git remote remove origin git remote add origin [email protected]:joyent/my-team-docs.git
-
Edit
mkdocs.yml
andpackage.json
to reflect your new documentation project. -
Run
make deps
to install the required dependencies. -
Replace the contents of this
README.md
, and publish your first commit.echo "# my-team-docs" > README.md git add . git commit -m'First commit of My Team Docs' git push -u origin master
Adding content is simple.
- Add markdown files to the
docs
directory. - Edit
mkdocs.yml
to define your site navigation. (Optionally, you can remove thenav
section and a single flat navigation will be rendered.)
There are some handy make
targets.
make
by itself will generate your site.make check
will check the contents ofdocs
withmarkdownlint
make serve
will start up a web server on http://127.0.0.1:8000 so you can preview your site.
There's no specific recomendation for publishing content. There are a number of easy options.
rsync
thesite
directory to a web server (make sure it has approrpriate authentication as needed).- Clone your repo onto a web server.
- Use this as the gh-pages branch of your a project
- Just browse the markdown directly on github without pre-rendering it (though
you won't get any features of
mkdocs
that way).
The only requirements are node.js (for markdownlint) and python 3.7 virtualenv
(i.e., virtualenv-3.7
, for mkdocs
). Having node and virtualenv-3.7
installed, simply run make deps
to install the additional components.
This repo is pre-configured to create a github workflow that will check all
pull requests with markdownlint
. This helps keep content clean for maximum
portability between markdown rendering engines.