Skip to main content

Extension of mkdocs-simple-plugin adding easy content inclusion

Project description

MkDocs semiliterate Plugin

This plugin for MkDocs is an extension of Allison Thackston's excellent mkdocs-simple-plugin. It allows you to include content from one file into another (via {! ... !} syntax), using exactly the same extraction specification that the simple plugin already uses for identifying documentation in source files.

Rationale

Time and trends have not validated Knuth's original vision of "literate programming" as a mainstream practice. Nevertheless, there remain significant advantages to incorporating all documentation, including user-guide-style narrative, into the source code for a project. These advantages include ease of maintenance and synchronization of code and documentation, and opportunities to make the ensemble of your code and documentation more DRY. Thus, it's worth using a "semiliterate" programming style, in which

  • code is arranged as dictated by best software engineering practices
  • documentation is co-located in the same files next to the implementing code
  • and tools are provided for extracting and assembling that documentation into readable form.

*[DRY]: Don't Repeat Yourself -- a coding philosophy of creating a single authoritative location for each piece of information.

The simple plugin goes a long way toward creating a semiliterate programming environment. However, in creating narrative documentation, it's very useful to be able to quote or incorporate content --- whether that be documentation blocks or code examples or code that itself serves as documentation to avoid repeating information --- from one file into another. To satisfy that need, this semiliterate plugin extends (i.e, literally inherits from) the simple plugin and adds a syntax for such inclusion.

With a few other small ease-of-use tweaks (documented in the Usage section), this extended plugin aims to produce a lightweight but comprehensive semiliterate programming environment. The documentation site is, of course, produced by MkDocs using the semiliterate plugin.

Installation

The mkdocs-semiliterate package which provides the semiliterate plugin for MkDocs is available via PyPI:

python3 -m pip install mkdocs-semiliterate

or of course if your pip is already set up to use a Python 3.5 (or later) installation, just

pip install mkdocs-semiliterate

License

This software is licensed under Apache 2.0.

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-semiliterate-0.1.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

mkdocs_semiliterate-0.1.1-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs-semiliterate-0.1.1.tar.gz.

File metadata

  • Download URL: mkdocs-semiliterate-0.1.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.0

File hashes

Hashes for mkdocs-semiliterate-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8a25a34f8ca62fc398b075ed5343a7d20d1f98ae945f9cab0c0be432a042e036
MD5 222e402a6cc1eaa94998bb3e29d34d96
BLAKE2b-256 57b49afba0794889cdd1479a89db654763e3093fd706fd4cc2cf388ead68d17c

See more details on using hashes here.

File details

Details for the file mkdocs_semiliterate-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mkdocs_semiliterate-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.0

File hashes

Hashes for mkdocs_semiliterate-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 90742dd70c59335ae080e31174641cf0c8aaa227689ed0de1905754ea5820be4
MD5 30f1d0f8497ba89defafbe67239b33bc
BLAKE2b-256 8d4596b5db523f0d29d42e5b59ed36942f0b9e6dc755367df79929feffd2cd4a

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