Skip to main content

MkDocs plugin to run a specified command or commands and include the output in the generated site.

Project description

MkDocs Plugin : run-shell-cmd

PyPI version

This is an MkDocs plugin that runs a specified command (or commands) during the build and serve process and injects the command and output into the generated site in a fenced block.

It's very useful for documenting command-line programs, expecially during development where the command line may change frequently.

See the Website for examples and full documentation.

IMPORTANT

This plugin allows running arbitrary commands on your system. It does NOT check the command for safety, and it does NOT run the command in a sandbox. However, it does ask you if you want to run each command, and it does allow you to disable all commands from running again for the duration of the session. Also commands are not run using a shell, so your environment variables are not available to the command. Commands are set in the markdown file, so they are not run unless you build, serve or publish the site. If you are using a CI/CD pipeline to generate your docs, you should be aware that some standard commands may be missing or blocked, and the CI will probably hang due to waiting for input. Generating the docs on a local machine and then pushing them up to your hosting is probably a better idea.

Installation

Install the package with pip:

pip install mkdocs-run-shell-cmd-plugin

or, if you are using Poetry:

poetry add mkdocs-run-shell-cmd-plugin --group dev

Configuration and Usage

See the Website for full usage information.

License

This is released under the MIT License. See the bundled LICENSE file for more details.

TODO

See TODO.md for a list of outstanding tasks or ideas.

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_run_shell_cmd_plugin-0.2.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

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

mkdocs_run_shell_cmd_plugin-0.2.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_run_shell_cmd_plugin-0.2.0.tar.gz.

File metadata

  • Download URL: mkdocs_run_shell_cmd_plugin-0.2.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.0 CPython/3.10.7 Linux/5.19.0-45-generic

File hashes

Hashes for mkdocs_run_shell_cmd_plugin-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d8447009ca6ad3225371db6ac97ed408872efe81a5b648ace679013cb9ba6096
MD5 48d9d2a13b05baf8a90c0a1f6cb105c7
BLAKE2b-256 10611b392f78268bbf5912e132fc9ef32417a58039f1d6681e10b89af9666168

See more details on using hashes here.

File details

Details for the file mkdocs_run_shell_cmd_plugin-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_run_shell_cmd_plugin-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f8e680e47a8663ccc2315668db5e98c3f4518543205057c957763ecfba1a89b
MD5 697c60e79c8bf4b5cff310e9d9a2cd38
BLAKE2b-256 b2e9413910f1d5e95195b96bf98a29cef16360bd83118c38e74a3efda963dbf7

See more details on using hashes here.

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