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

Uploaded Source

Built Distribution

mkdocs_semiliterate-0.8.2-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mkdocs_semiliterate-0.8.2.tar.gz
  • Upload date:
  • Size: 15.7 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.2.tar.gz
Algorithm Hash digest
SHA256 54dd7e7edbef057a5f5cf8e87c79f5b31cc4763b368b6bf301c79d83de03db26
MD5 76fbca8c15b33bb30e683ca5ebbb67fe
BLAKE2b-256 08000cf88132042d7dedcab1ef138ce57ea79323d6a28c469d2db592edc7c912

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkdocs_semiliterate-0.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1838bbdc93f8fe29b9e54709ac455d0d7d7e4eed3ee9f52747fbdb251b7138af
MD5 621c81b985b2800276806c683129478d
BLAKE2b-256 930a09b0a9879cb26c2adc863bf9af5cc346834b7c697dbcb9737e3eb0fdddd0

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