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 and Acknowledgments
This software is licensed under Apache 2.0. Icons8 provided the icon.
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
File details
Details for the file mkdocs_semiliterate-0.8.1.tar.gz
.
File metadata
- Download URL: mkdocs_semiliterate-0.8.1.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3b4236d35e159f6e944a90c064855fe79ecb64b4eba042cfeed4af331022e1f |
|
MD5 | 325b5c586e4a2f0cee63e2ad8ae69b10 |
|
BLAKE2b-256 | 770a8f6041028275370cf85d742f7eaac5946c296b756de586c46e5996ee18d5 |
File details
Details for the file mkdocs_semiliterate-0.8.1-py3-none-any.whl
.
File metadata
- Download URL: mkdocs_semiliterate-0.8.1-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9e06437b93f627a974ee4d6783b6c3a6478e252ce5d35a1a90d035db3c85d21 |
|
MD5 | 92f45236ae7944d7ddf5e1e234027835 |
|
BLAKE2b-256 | f298f9e8507468d5330a66a637ca2749f91696f991ce25e0df3cdff8f7cbbf6c |