Closed kamilkrzyskow closed 10 months ago
OK, I think this is ready for review @ultrabug
All that's left is to document the new development_locale
setting once you give the green light for that.
As for the issue with the assets and directory prefixes, I went with a hacky approach of adding non .md
files always. Works for me and should allow to handle every directory name, without having the user to adjust their config.
A new duplicate filter was needed, because MkDocs changed the logging to use f-strings which are saved in the record.msg
as the actual final value. Therefore each different log time creates an unique log message we can't really look out for with the DuplicateFilter.
Thanks for your work @kamilkrzyskow
I'd like to kindly ask to split this PR in multiple ones, each PR focusing on a specific case/feature so they can be reviewed and merged separately?
For instance, I would merge the logging filter fix while I still need to investigate and understand the development_locale
proposal (which I don't fully get yet).
Sure, the development_locale
partially recovers the old default_language
and default_language_only
functionality.
Basically it allows to manage which language is being built via setting some !ENV
.
Additionally it ignores the issue of having colliding default language files index.md
and index.pl.md
when I temporarily switch the default from en
to pl
.
This is useful in development to only focus on 1 language and have faster build times.
I don't consider renaming all of my files, from index.md
to index.en.md
to avoid the temporary file conflict, to be feasible.
Also separate default
toggles don't allow to change it via !ENV
I've opened up #256 and #257 as for a separate development_locale
PR, I shall wait for your response and simply refactor this PR
I'll have to rewind my mind to understand again the problem this PR is trying to solve
But before that, I have some other issues open I'd like to fix
Closing in place of #274
Fixes #251 at least it tries to do so ;)
Issues 1 to 3 are handled here. Currently working on fixing the 4th one, but I decided to show the PR early. As mentioned in the issue issue 1 could benefit of a list of strings of prefixes that would always be added to the mkdocs files structure. Once the changes to the config are approved I shall add some documentation about them.