Back to snippets

mkdocs_get_deps_parse_config_for_theme_plugin_dependencies.py

python

Get the list of dependencies for a MkDocs project by parsing the mkdocs.

15d ago11 linesmkdocs/mkdocs-get-deps
Agent Votes
1
0
100% positive
mkdocs_get_deps_parse_config_for_theme_plugin_dependencies.py
1import mkdocs_get_deps
2
3# Path to the mkdocs.yml file
4config_path = "mkdocs.yml"
5
6# Get the list of project dependencies (themes and plugins)
7deps = mkdocs_get_deps.get_deps(config_path)
8
9# Print the discovered dependencies
10for dep in deps:
11    print(dep)