Conversation
The user story is that the following command should let you "just build" any MkDocs site:
pip install $(mkdocs get-deps) && mkdocs build
This cross-references 2 files:
* mkdocs.yml - `theme`, `plugins`, `markdown_extensions`
* projects.yaml - a registry of all popular MkDocs-related projects and which entry points they provide - downloaded on the fly
-and prints the names of Python packages from PyPI that need to be installed to build the current MkDocs project
Contributor
|
Thank you @oprypin, that's a great addition! |
pawamoy
approved these changes
May 1, 2023
pawamoy
approved these changes
Jun 6, 2023
mkdocs/commands/get_deps.py
Outdated
| """Get names of plugins/extensions from the config - in either a list of dicts or a dict.""" | ||
|
|
||
| def dig(cfg, keys: str): | ||
| """Receives a string such 'foo.bar' and returns `cfg['foo']['bar']`, or `NotFound`. |
Contributor
There was a problem hiding this comment.
Suggested change
| """Receives a string such 'foo.bar' and returns `cfg['foo']['bar']`, or `NotFound`. | |
| """Receives a string such as 'foo.bar' and returns `cfg['foo']['bar']`, or `NotFound`. |
get-deps command: infer PyPI depedencies from mkdocs.ymlget-deps command: infer PyPI dependencies from mkdocs.yml
Contributor
Author
Welp, that's staying that way, that commit is very old 🥲 |
Contributor
It means I can add an |
Contributor
Author
|
Yes and it's already there Or did you have something else in mind? |
Contributor
|
Nice! No no, just asking. What do the keys mean in: extra_dependencies:
plugins.mkdocstrings.handlers.crystal: mkdocstrings-crystal
plugins.mkdocstrings.handlers.python: mkdocstrings-python
|
Contributor
|
Ah, I think I got it, it's the keys in mkdocs.yml 👍 |
This is inferred from particular config keys The current known plugin in need of this is mkdocstrings (handlers)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The user story is that the following command should let you "just build" any MkDocs site:
This cross-references 2 files:
theme,plugins,markdown_extensions-and prints the names of Python packages from PyPI that need to be installed to build the current MkDocs project
Thanks @pawamoy for inspiration and starting https://github.com/pawamoy/best-of-mkdocs