Closed thejcannon closed 10 months ago
@lukasgeiter This is ready to review.
The je ne sais quoi is boiled down to:
File
per config, so there isn't a split codepathAnd to report, this is working as expected on my project :tada:
Thanks for creating this PR! Before I dive into reviewing, I've noticed some formatting changes that shouldn't be there. Please make sure to format the files using black.
Please disregard the failing tests for pypy, they have nothing to do with your PR. I've actually just removed them on master
so a rebase should get rid of them. The same does not apply for the failing tests on windows, that seems to be an actual issue 😉
Thanks for taking a look!
Yeah looks like editor ran black with a different line length (shorter) leading to some spurious reformats. I'll fix those
@lukasgeiter All tests are passing! Ready for review when you are.
@lukasgeiter I think that should cover those comments. Happy for another look
Released with version 2.9.2. Thanks again for your work!
Thank you for accepting it, and reviewing it
This change allows
mkdocs-awesome-pages-plugin
to play nicely withmkdocs-gen-files
, specifically with generated content (.md
) and generated config (.pages
).This is accomplished by:
on_files
in the plugin that synthesizes aFile
per config in the docs dir. This means we can later unconditionally pull fromFiles
for both in-docs and generated configs.Files
down the chain toNavigationMeta
Files
to validate the "out-of-docs" check, so we also remove thedocs_dir
arg_gather_metadata
operate on a "relative file" abstraction (e.g. the path below "docs_dir)Page
s, that means addingitem.file.src_path
instead ofitem.file.abs_src_path
Meta.try_load_from
withMeta.try_load_from_files
such that we always load fromFiles
path
attribute with the relative pathThat summarizes the package changes, then there was a few test changes top facilitate this change:
docs_dir
tofiles
test_meta.py
changes for the correctFiles
lookup, and new methodmkdocs-gen-files
Fixes #78