1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-23 23:21:00 +01:00

Added preload hints in privacy plugin replacements (#7733)

This commit is contained in:
Nejc Habjan 2024-11-22 14:24:58 +01:00 committed by GitHub
parent eee4934efd
commit 6a0a790e8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -302,8 +302,8 @@ class PrivacyPlugin(BasePlugin[PrivacyConfig]):
if rel == "preconnect":
return ""
# Replace external style sheet or favicon
if rel == "stylesheet" or rel == "icon":
# Replace external favicon, preload hint or style sheet
if rel in ("icon", "preload", "stylesheet"):
file = self._queue(url, config)
el.set("href", resolve(file))

View File

@ -302,8 +302,8 @@ class PrivacyPlugin(BasePlugin[PrivacyConfig]):
if rel == "preconnect":
return ""
# Replace external style sheet or favicon
if rel == "stylesheet" or rel == "icon":
# Replace external favicon, preload hint or style sheet
if rel in ("icon", "preload", "stylesheet"):
file = self._queue(url, config)
el.set("href", resolve(file))