From 159b28cd64347789cf0c43fde24c519c2d9b318e Mon Sep 17 00:00:00 2001 From: squidfunk Date: Fri, 22 Sep 2023 19:30:57 +0200 Subject: [PATCH] Test direct GitHub Pages deployment --- material/overrides/hooks/translations.py | 4 ++-- src/overrides/hooks/translations.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/material/overrides/hooks/translations.py b/material/overrides/hooks/translations.py index 35b8c2d9c..661fd18e1 100644 --- a/material/overrides/hooks/translations.py +++ b/material/overrides/hooks/translations.py @@ -21,7 +21,7 @@ import os import re -from glob import glob +from glob import iglob from mkdocs.config.defaults import MkDocsConfig from mkdocs.structure.pages import Page from urllib.parse import urlencode, urlparse @@ -40,7 +40,7 @@ def on_page_markdown(markdown: str, *, page: Page, config: MkDocsConfig, files): # Collect all existing languages names: dict[str, str] = {} known: dict[str, dict[str, str]] = {} - for path in glob("material/templates/partials/languages/*.html"): + for path in iglob("src/templates/partials/languages/*.html"): with open(path, "r", encoding = "utf-8") as f: data = f.read() diff --git a/src/overrides/hooks/translations.py b/src/overrides/hooks/translations.py index 35b8c2d9c..661fd18e1 100644 --- a/src/overrides/hooks/translations.py +++ b/src/overrides/hooks/translations.py @@ -21,7 +21,7 @@ import os import re -from glob import glob +from glob import iglob from mkdocs.config.defaults import MkDocsConfig from mkdocs.structure.pages import Page from urllib.parse import urlencode, urlparse @@ -40,7 +40,7 @@ def on_page_markdown(markdown: str, *, page: Page, config: MkDocsConfig, files): # Collect all existing languages names: dict[str, str] = {} known: dict[str, dict[str, str]] = {} - for path in glob("material/templates/partials/languages/*.html"): + for path in iglob("src/templates/partials/languages/*.html"): with open(path, "r", encoding = "utf-8") as f: data = f.read()