Skip to main content

MkDocs plugin to programmatically generate documentation pages during the build

Project description

mkdocs-gen-files

Plugin for MkDocs to programmatically generate documentation pages during the build

PyPI License GitHub Workflow Status

pip install mkdocs-gen-files

Continue to the documentation site.

Usage

Activate the plugin in mkdocs.yml (scripts is a required list of Python scripts to execute, always relative to mkdocs.yml):

plugins:
  - search
  - gen-files:
      scripts:
        - gen_pages.py  # or any other name or path

Then create such a script gen_pages.py (this is relative to the root, not to the docs directory).

import mkdocs_gen_files

with mkdocs_gen_files.open("foo.md", "w") as f:
    print("Hello, world!", file=f)

This added a programmatically generated page to our site. That is, the document doesn't actually appear in our source files, it only virtually becomes part of the site to be built by MkDocs.

Continue to the documentation site.

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_gen_files-0.6.1.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

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

mkdocs_gen_files-0.6.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_gen_files-0.6.1.tar.gz.

File metadata

  • Download URL: mkdocs_gen_files-0.6.1.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mkdocs_gen_files-0.6.1.tar.gz
Algorithm Hash digest
SHA256 57d7ff2229e23d077e46d14a33db6d37c8823f6ce1a503c874c1764a71679763
MD5 01190be4055f0e83ea64debb90f97355
BLAKE2b-256 4343428f312149c161cae557eecd35f3c4a82b867998b1d47fb29fdfe927be26

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_gen_files-0.6.1.tar.gz:

Publisher: deploy-release.yml on oprypin/mkdocs-gen-files

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mkdocs_gen_files-0.6.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_gen_files-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b3182bfc6219e35b8d26658cb988368659d5d023aac30c2a819247558fc12189
MD5 e89e7897f40b0104498a98853f65a9be
BLAKE2b-256 ee1b3075eb67fe66e19db059f0a25744c4e56978a309603a20e1d3353d545b5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_gen_files-0.6.1-py3-none-any.whl:

Publisher: deploy-release.yml on oprypin/mkdocs-gen-files

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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