diff --git a/.gitignore b/.gitignore
index c52ef795..25da9d5f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
site
venv*
-.vscode
\ No newline at end of file
+.vscode
+__pycache__/
\ No newline at end of file
diff --git a/docs/themes/screenshots.md b/docs/themes/screenshots.md
index f0d79140..48521f64 100644
--- a/docs/themes/screenshots.md
+++ b/docs/themes/screenshots.md
@@ -2,7 +2,9 @@
{% set themes = config.extra.themes %}
{% for theme in themes %}
+{% if file_exists("/docs/site_assets/" ~ page.file.name ~ "/" ~ theme ~ ".png") %}
{{ theme.capitalize() }} Theme
+{% endif %}
{% endfor %}
\ No newline at end of file
diff --git a/docs/themes/title.md b/docs/themes/title.md
index 8dbd9d8a..1ba9746f 100644
--- a/docs/themes/title.md
+++ b/docs/themes/title.md
@@ -1,3 +1,4 @@
-
{{ page.file.name.title().replace("-", " ") }} {% if deprecated == True %}(Deprecated){% else %}{% endif %}
+ {% if file_exists("/docs/site_assets/" ~ page.file.name ~ "/" ~ "logo.png") %}
{% endif %}
+{{ page.file.name.title().replace("-", " ") }} {% if deprecated == True %}(Deprecated){% else %}{% endif %}
Custom [{{ page.file.name.title().replace("-", " ") }}]({{ github_link }}) CSS
\ No newline at end of file
diff --git a/main.py b/main.py
new file mode 100644
index 00000000..4d32ffc5
--- /dev/null
+++ b/main.py
@@ -0,0 +1,9 @@
+from pathlib import Path
+
+def define_env(env):
+ @env.macro
+ def file_exists(filepath: str) -> bool:
+ if not isinstance(filepath, str):
+ return False
+ filepath: Path = Path.cwd() / filepath.lstrip('/')
+ return filepath.exists()