Skip to content

Conversation

@athackst
Copy link
Owner

@athackst athackst commented Mar 12, 2023

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-localized work 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:

  • The docs_dir is no longer updated to be the build_docs_dir. You may need to update your config so that the build_docs_dir and the docs_dir are the same for plugins that require file structure.
  • The build_docs_dir directory 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 /tmp on each invocation. This may have some minor consequences for the local serving of the mkdocs site.
  • Build now happens in on_files instead of prebuild which may affect the order of plugins.

@github-actions github-actions bot added the feature Added feature to the plugin label Mar 12, 2023
@athackst athackst force-pushed the feat/better-on-files branch from 81d7436 to 118953e Compare March 12, 2023 05:25
@athackst athackst added the major label Mar 12, 2023
@athackst athackst force-pushed the feat/better-on-files branch 3 times, most recently from 398afe9 to 0246c7e Compare March 12, 2023 22:58
@athackst athackst force-pushed the feat/better-on-files branch from 0246c7e to bdb1e7f Compare June 20, 2023 05:33
@athackst athackst force-pushed the feat/better-on-files branch from bdb1e7f to d1110f8 Compare June 22, 2023 01:09
@athackst
Copy link
Owner Author

@gwhitney Not sure if this will cause issues for you

@gwhitney
Copy link
Contributor

Thanks for the heads up! I am sure I will need to make changes but I am sure I can adapt. So I will wait til you release and then I will update my mod. :)

@athackst athackst merged commit c358400 into main Jun 26, 2023
@athackst athackst deleted the feat/better-on-files branch June 26, 2023 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Added feature to the plugin major

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants