Skip to main content

Plugin for adding simple wiki site creation from markdown files interspersed within your code with MkDocs.

Project description

athackst/mkdocs-simple-plugin

athackst.github.io/mkdocs-simple-plugin

Test Docs

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 docs folder.

  1. My repository is too big for a single file

    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 single include directory, your code base is probably also too large for documentation to fit within a single docs 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.

  2. 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.

  3. 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.

Simply 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"

Some things to note:

  • Files in the docs_dir (by default docs) will be merged with any other documentation in your repository.
  • If you have specified nav elements in your mkdocs.yml, only those pages will be rendered in the site

Then, you build the mkdocs from the command line

mkdocs build

Test

And you can even preview the resulting site

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

Contributing

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkdocs-simple-plugin-0.0.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkdocs_simple_plugin-0.0.1-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs-simple-plugin-0.0.1.tar.gz.

File metadata

  • Download URL: mkdocs-simple-plugin-0.0.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for mkdocs-simple-plugin-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2ec0e5329d5cd993967704512500ab145cd86dba11fae7c4bc94585994468008
MD5 cef9e57e7beb087dbe891454fd544fa1
BLAKE2b-256 e5946a0281d0ec2b7c924447e457b191de722bce81b66d204e2ad7cb4b208372

See more details on using hashes here.

File details

Details for the file mkdocs_simple_plugin-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: mkdocs_simple_plugin-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for mkdocs_simple_plugin-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 17787d916f2c8e5068861f09cbd44c1f296b726a972a0c1496a819a56d630859
MD5 a2a6a7fbeaef02543f40d783df5639dd
BLAKE2b-256 d782accf484b2bdf946531af1fc4e726080f1c96e9abcff404166fb0815b67dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page