Use on_files instead of prebuild #495
Merged
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.
This feature updates the files in on_files to point to the original .md file if it exists and copies the file into a temporary build directory.
By updating on_files to point to the original file, plugins such as
git-revision-date-localizedwork as expected.For other plugins like
awesome-pages, the files must all exist within the "docs" directory structure, so the plugin continues to copy these files to the build directory.Major changes:
docs_diris no longer updated to be thebuild_docs_dir. You may need to update your config so that thebuild_docs_dirand thedocs_dirare the same for plugins that require file structure.build_docs_dirdirectory is no longer cleared at each "config"/reload. If a user has set the build directory, they are now responsible for clearing the folder as needed. If the user has not set the build directory, a new random folder will be created in/tmpon each invocation. This may have some minor consequences for the local serving of the mkdocs site.on_filesinstead ofprebuildwhich may affect the order of plugins.