Closed pana-exfo closed 1 week ago
Thanks for reporting. This is intended behavior. Setting assets_fetch
to false
sets the privacy plugin into "reporting" mode, which ensures that you are not using external assets. The use case is that you self-host by yourself, but want a safety net so that you do not use external assets accidentally. This is also why this has to be a warning:
Use this setting to control whether the plugin should downloads or only report external assets when they're encountered. If you already self-host all external assets, this setting can be used as a safety net to detect links to external assets placed by the author in pages.
However, you can easily achieve what you want by setting log_level
to error
:
plugins:
- privacy:
cache_dir: dir/
assets_fetch: false
log_level: error
Result:
$ mkdocs build
INFO - Cleaning site directory
INFO - Building documentation to directory: .../site
INFO - Documentation built in 0.15 seconds
It's always a good idea to check the plugin settings, as our plugins have plenty.
Context
Build server is offline and external content is cached locally
Bug description
Current behavior Privacy plugin is using files from local cache and gives warnings. When running in strict mode, these warnings cause build to fail.
Expected behavior Privacy plugin is using files from local cache and prints warning if files are missing from local cache.
Related links
Reproduction
9.5.44-cached-privacy-fail-in-strict-mode.zip
Steps to reproduce
mkdocs build
to download content to cachemkdocs build --strict
Browser
No response
Before submitting