Skip to main content

Extension of mkdocs-simple-plugin adding easy content inclusion

Project description

Dreaming of integrated documentation 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


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.8.3.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

mkdocs_semiliterate-0.8.3-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_semiliterate-0.8.3.tar.gz.

File metadata

  • Download URL: mkdocs_semiliterate-0.8.3.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for mkdocs_semiliterate-0.8.3.tar.gz
Algorithm Hash digest
SHA256 cbaa04cab28fa6c820e5d30188377a6a1583bd49f36ba50031d57ce016adb414
MD5 6f7e31246d85b560570d5dbdd09282c7
BLAKE2b-256 638b9cc0e8c44cf264cd0fe8e1de000b29390813b7384c6e6d3cf87338c57308

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkdocs_semiliterate-0.8.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b8599daaee997d5467a9cd2bc4b9248105d3249e23b11f46390128721d283c72
MD5 6cb47c1a2838dedffa24b5c9375659ce
BLAKE2b-256 f3e2f850109dbbd0cd524f7162a2ba446185997c7d2ada623c6f89d0f179029b

See more details on using hashes here.

Supported by

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