-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
efc0734
commit f93b6c2
Showing
12 changed files
with
82 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
.idea/ | ||
/.idea/ | ||
|
||
dist/ | ||
/dist/ | ||
|
||
# Ignore version binaries in root project-folder | ||
/version* | ||
/.cache/ | ||
/site/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/docs/includes/abbreviations.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
_[CLI]: Command Line Interface | ||
_[cli]: Command Line Interface | ||
*[CLI]: Command Line Interface | ||
*[cli]: Command Line Interface |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
<br> | ||
<div style="text-align: center"> | ||
<img alt="logo" src="assets/images/logo.svg"/> | ||
</div> | ||
|
||
--8<-- "README.md:description" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import logging | ||
import os | ||
import re | ||
from urllib.parse import urlparse | ||
|
||
import material.plugins.privacy.plugin as privacy | ||
from unittest.mock import patch | ||
|
||
from urllib.parse import ParseResult as URL | ||
from mkdocs.structure.files import File | ||
from colorama import Fore, Style | ||
|
||
# Set up logging | ||
log = logging.getLogger("mkdocs.material.privacy") | ||
|
||
|
||
def _is_excluded(self, url: URL, initiator: File | None = None): | ||
if not self._is_external(url): | ||
return True | ||
|
||
# Skip if external assets must not be processed | ||
if not self.config.assets: | ||
return True | ||
|
||
# If initiator is given, format for printing | ||
via = "" | ||
if initiator: | ||
via = "".join([ | ||
Fore.WHITE, Style.DIM, | ||
f"in '{initiator.src_uri}' ", | ||
Style.RESET_ALL | ||
]) | ||
|
||
# Print warning if fetching is not enabled | ||
if not self.config.assets_fetch: | ||
log.warning(f"External file: {url.geturl()} {via}") | ||
return True | ||
|
||
if "img.shields.io" in url.geturl(): | ||
return True | ||
|
||
# File is not excluded | ||
return False | ||
|
||
|
||
if os.getenv("EXCLUDE_SHIELDS_IO_PRIVACY") == "true": | ||
# Only exclude shields.io from the privacy plugin if desired (i.e. for the "main" version of docs) | ||
privacy.PrivacyPlugin._is_excluded = _is_excluded |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import re | ||
|
||
|
||
def on_page_content(html: str, *, page, **_): | ||
if page.file.src_uri == "index.md": | ||
html = html.replace('data-is-relative="true" src="./docs/', 'data-is-relative="true" src="') | ||
return html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters