Closed facelessuser closed 1 year ago
Hi @facelessuser !
There currently is no way to silence these warnings.. but I agree there should be. More users are using strict
mode like you are and want to remove the warnings (#89)
This is the line causing the warning:
Your specific example is not related to the fallback_to_build_date
option setting, because git
is not failing, it's just that there are not git entries for the file.
I see some options:
1) Change all the warnings
to info
level, and add a new strict
option to this plugin that would log warnings instead of info (and recommends users to use mkdocs --strict
to create errors from warnings).
2) Add a new option report_issues_as
(need to find a better name) that you can set to "info" instead of a default "warning" .
I prefer the first option. Will try to pick this up somewhere this week!
Sounds great! I'm agnostic to how they get silenced as long as it is possible 🙃. I'm fine with option 1.
New release v1.2.0
just pushed to pypi
For future reference, to turn off warnings, you can now in your mkdocs.yml
do:
plugins:
- git-revision-date-localized:
strict: false
I have some documentation tests that build the documentation in strict mode to find any issues and then runs a spellchecker on the output afterward. I find it very frustrating that I get these warnings in particular:
I've specifically enabled the following to handle the fact that the file has no history yet I still get the warning which fails the build.
I want the tests to be able to pass in a release bundle that does not have git, so I need this warning to be optional if at all possible.
Are the warnings really necessary if I've explicitly told it to fallback to build date? Or can we make such warnings optional?