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.0.tar.gz (8.6 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.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mkdocs_gen_files-0.6.0.tar.gz
  • Upload date:
  • Size: 8.6 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.0.tar.gz
Algorithm Hash digest
SHA256 52022dc14dcc0451e05e54a8f5d5e7760351b6701eff816d1e9739577ec5635e
MD5 6b0526816feb790294762c8cb590b358
BLAKE2b-256 6135f26349f7fa18414eb2e25d75a6fa9c7e3186c36e1d227c0b2d785a7bd5c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_gen_files-0.6.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_gen_files-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 815af15f3e2dbfda379629c1b95c02c8e6f232edf2a901186ea3b204ab1135b2
MD5 2adcecd6cd059a79473b57f9be8be61d
BLAKE2b-256 8dec72417415563c60ae01b36f0d497f1f4c803972f447ef4fb7f7746d6e07db

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_gen_files-0.6.0-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