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 GitHub 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):

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

Uploaded Source

Built Distribution

mkdocs_gen_files-0.3.4-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs-gen-files-0.3.4.tar.gz.

File metadata

  • Download URL: mkdocs-gen-files-0.3.4.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.9.9 Linux/5.15.6-arch2-1

File hashes

Hashes for mkdocs-gen-files-0.3.4.tar.gz
Algorithm Hash digest
SHA256 c69188486bdc1e74bd2b9b7ebbde9f9eb21052ae7762f1b35420cfbfc6d7122e
MD5 501dcf110a9c75c798d03459d33eb87c
BLAKE2b-256 3dee2efef9c9d7a371239a49ffafe4fc39fa110981988495b2d2d09dcc0eff20

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mkdocs_gen_files-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.9.9 Linux/5.15.6-arch2-1

File hashes

Hashes for mkdocs_gen_files-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 07f43245c87a03cfb03884e767655c2a61def24d07e47fb3a8d26b1581524d6a
MD5 c54e85e757583052654ea72e38dab636
BLAKE2b-256 db22f5bd54896de7f48855920c5e7e3d62867008735173132a64b74778067899

See more details on using hashes here.

Provenance

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