Plugin for adding simple wiki site creation from markdown files interspersed within your code with MkDocs.
Project description
mkdocs-simple-plugin
This plugin enables you to build documentation from markdown files interspersed within your code. It is designed for the way developers commonly write documentation in their own code -- with simple markdown files.
About
You may be wondering why you would want to generate a static site for your project, without doing the typical "wiki" thing of consolidating all documentation within a single docs
folder or using a single README
file.
-
My repository is too big for a single documentation source.
Sometimes it isn't really feasible to consolidate all documentation within an upper level
docs
directory. This is often the case with medium/large repositories. In general, if your code base is too large to fit well within a singleinclude
directory, your code base is probably also too large for documentation to fit within a singledocs
directory.Since it's typically easier to keep documentation up to date when it lives as close to the code as possible, it is better to create multiple sources for documentation.
-
My repository is too simple for advanced documentation.
If your code base is very very large, something like the monorepo plugin might better fit your needs.
For most other medium+ repositories that have grown over time, you probably have scattered documentation throughout your code. By combining all of that documentation while keeping folder structure, you can better surface and collaborate with others. And, let's face it. That documentation is probably all in markdown, since github renders it nicely.
-
I want a pretty documentation site without the hassle.
Finally, you may be interested in this plugin if you have a desire for stylized documentation, but don't want to invest the time/energy in replicating information you already have in your README.md files, and you want to keep them where they are (thank you very much).
Getting Started
This plugin was made to be super simple to use.
Prerequisites
You will need to have mkdocs installed on your system. I recommend installing it via pip to get the latest version.
sudo apt-get install python-pip
pip install --upgrade pip --user
pip install mkdocs --user
Installation
Then, install the plugin.
pip install mkdocs-simple-plugin
Usage
It's easy to use this plugin. You can either use the generation script included, or set up your own custom config.
Basic
Basic usage was optimized around ease of use. Simply run
mkdocs_simple_gen
and you're all set!
Advanced
Advanced usage is also easy.
Create a mkdocs.yml
file in the root of your directory and add this plugin to it's plugin list.
site_name: your_site_name
plugins:
- simple
If you'd like, you can specify some additional configuration settings.
# simple plugin configuration options
ignore_hidden: True # Ignore md files in hidden directories (those starting with a '.')
ignore_directories: # Folders that should be ignored to add md files
- "drafts"
Note: Files in the docs_dir
(by default docs
) will be merged with any other documentation in your repository.
Then, you can build the mkdocs from the command line.
mkdocs build
Test
One of the best parts of mkdocs is it's ability to serve (and update!) your documentation site locally.
mkdocs serve
Deploy
After you build, you'll need to initialize your deployment by running the gh-deploy command for mkdocs. This will set up the gh-pages branch and copy the site over.
mkdocs gh-deploy
Next, you'll need to set up your github repository to enable gh-pages support. See Github Pages
License
This software is licensed under Apache 2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mkdocs-simple-plugin-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b749e119d0b3af4e6a7ad55b15f9270cba844bc0ffa2e9607d1e7951a1d0764f |
|
MD5 | ef5420eb35c48a201dfb94ce462bd83a |
|
BLAKE2b-256 | cb1dc40171e0c0396a31811b59a75d7546e43c98b25baa087b80e59a4f9e08aa |
Hashes for mkdocs_simple_plugin-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28c914400511978deeeb397f874e0279f759db19a5e5ad37ba014d9ffa7302f3 |
|
MD5 | a0b117dc27db61027f08de32f6091719 |
|
BLAKE2b-256 | 7ae10f3ffc3274021adebb3360638be6ce1684984a85c1f49291502e93974e66 |