Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fix infinite live reloading of the docs #36

Merged
merged 4 commits into from
Nov 21, 2022

Conversation

Higgcz
Copy link
Contributor

@Higgcz Higgcz commented Nov 16, 2022

Previously, the docs would reload infinitely because there was a hook that automatically generated markdown files out of Jupyter notebooks.

The problem was that the generated markdown files were stored directly in the docs folder, which triggered mkdocs to rebuild again.

This PR changes the target directory of the generated files and adds a new mkdocs hook (on_files) that adds all the files during the build process. This way the autogenerated files are not triggering the reload.

Waiting for #39

@Higgcz Higgcz added this to the 0.4.0 milestone Nov 16, 2022
@Higgcz Higgcz self-assigned this Nov 16, 2022
@codecov-commenter
Copy link

codecov-commenter commented Nov 16, 2022

Codecov Report

Merging #36 (a33174b) into master (ed5a9f5) will not change coverage.
The diff coverage is n/a.

❗ Current head a33174b differs from pull request most recent head 4c086a1. Consider uploading reports for the commit 4c086a1 to get more accurate results

@@           Coverage Diff           @@
##           master      #36   +/-   ##
=======================================
  Coverage   52.18%   52.18%           
=======================================
  Files          43       43           
  Lines        6241     6241           
=======================================
  Hits         3257     3257           
  Misses       2984     2984           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Higgcz Higgcz added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 17, 2022
@Higgcz
Copy link
Contributor Author

Higgcz commented Nov 19, 2022

This is ready for merging, but it needs to be merged after #39

Previously, the docs would reload infinitely because there was a hook
that automatically generated markdown files out of jupyter notebooks.

The problem was that the generated markdown files were stored directly
into docs folder, which triggered mkdocs to rebuild again.

This patch changes the target directory of the generated files
and adds a new mkdocs hook (`on_files`) that adds all the files
during the build process. This way the autogenerated files
are not triggering the reload.
@Higgcz Higgcz merged commit eaac131 into master Nov 21, 2022
@Higgcz Higgcz deleted the fix/docs-live-reload-loop branch November 21, 2022 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants