MkDocs extension that lists all dependencies according to a mkdocs.yml file
Project description
mkdocs-get-deps
An extra command for MkDocs that infers required PyPI packages from plugins
in mkdocs.yml.
Installation: | Alternatively through MkDocs itself: |
pip install mkdocs-get-deps
|
pip install mkdocs
|
This command guesses the Python dependencies that a MkDocs site requires in order to build. It simply prints the PyPI packages that need to be installed. In the terminal it can be combined directly with a pip install
command, as per the last example below:
Usage: | Alternatively through MkDocs itself: |
# Print dependencies of the current project
mkdocs-get-deps
# Save them into a file
mkdocs-get-deps > requirements.txt
# Install dependencies on the fly
pip install $(mkdocs-get-deps)
|
mkdocs get-deps
mkdocs get-deps > requirements.txt
pip install -r requirements.txt
pip install $(mkdocs get-deps)
|
The idea is that right after running this command, you can directly follow it up with mkdocs build
and it will almost always "just work", without needing to think which dependencies to install.
The way it works is by scanning mkdocs.yml
for themes:
, plugins:
, markdown_extensions:
items and doing a reverse lookup based on a large list of known projects (catalog, see below).
Of course, you're encouraged to use a "virtualenv" with such a command. Also note that for environments that require stability (for example CI) directly installing deps in this way is not a very reliable approach as it precludes dependency pinning.
The command allows overriding which config file is used (instead of mkdocs.yml
in the current directory) as well as which catalog of projects is used (instead of downloading it from the default location). See mkdocs get-deps --help
.
MkDocs' official catalog of plugins
Check out https://github.com/mkdocs/catalog and add all your general-purpose plugins, themes and extensions there, so that they can be looked up through mkdocs get-deps
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mkdocs_get_deps-0.2.0.tar.gz
.
File metadata
- Download URL: mkdocs_get_deps-0.2.0.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 162b3d129c7fad9b19abfdcb9c1458a651628e4b1dea628ac68790fb3061c60c |
|
MD5 | 4144c380f8bea5be5e5da35e3d82984b |
|
BLAKE2b-256 | 98f5ed29cd50067784976f25ed0ed6fcd3c2ce9eb90650aa3b2796ddf7b6870b |
File details
Details for the file mkdocs_get_deps-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: mkdocs_get_deps-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bf11d0b133e77a0dd036abeeb06dec8775e46efa526dc70667d8863eefc6134 |
|
MD5 | 1c190eaf5967d4e29451a7259bea1141 |
|
BLAKE2b-256 | 9fd4029f984e8d3f3b6b726bd33cafc473b75e9e44c0f7e80a5b29abc466bdea |