Skip to content

Support MKDOCS_CONFIG_FILE environment variable - #4140

Open
wayyoungboy wants to merge 1 commit into
mkdocs:masterfrom
wayyoungboy:config-file-env-3970
Open

Support MKDOCS_CONFIG_FILE environment variable#4140
wayyoungboy wants to merge 1 commit into
mkdocs:masterfrom
wayyoungboy:config-file-env-3970

Conversation

@wayyoungboy

Copy link
Copy Markdown

Fixes #3970.

Summary

  • allow MKDOCS_CONFIG_FILE to select the config file when --config-file is not provided
  • preserve explicit --config-file precedence over the environment variable
  • add config file selection tests

Tests

  • PYTHONPATH=<downloaded wheels>:. python3.13 -m unittest mkdocs.tests.config.base_tests.ConfigBaseTests.test_load_config_file_from_env mkdocs.tests.config.base_tests.ConfigBaseTests.test_config_file_precedes_env
  • direct _open_config_file assertions for env config and default mkdocs.yml fallback
  • git diff --check -- mkdocs/config/base.py mkdocs/tests/config/base_tests.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow usage of a MKDOCS_CONFIG_FILE environment variable

1 participant