From 98c32aa24dfdce201291e788116e67a9dd7ef707 Mon Sep 17 00:00:00 2001 From: Oleh Prypin Date: Thu, 29 Sep 2022 16:55:17 +0200 Subject: [PATCH] Guard against `repo_url` being None in MkDocs 1.4 --- material/partials/consent.html | 2 +- src/partials/consent.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/material/partials/consent.html b/material/partials/consent.html index 6156c60e9..afb7038f6 100644 --- a/material/partials/consent.html +++ b/material/partials/consent.html @@ -7,7 +7,7 @@ {% set _ = cookies.update({ "analytics": "Google Analytics" }) %} {% endif %} {% endif %} -{% if "github.com" in config.repo_url %} +{% if config.repo_url and "github.com" in config.repo_url %} {% if "github" not in cookies %} {% set _ = cookies.update({ "github": "GitHub" }) %} {% endif %} diff --git a/src/partials/consent.html b/src/partials/consent.html index 0fdad8278..9f1a35ed3 100644 --- a/src/partials/consent.html +++ b/src/partials/consent.html @@ -27,7 +27,7 @@ {% set _ = cookies.update({ "analytics": "Google Analytics" }) %} {% endif %} {% endif %} -{% if "github.com" in config.repo_url %} +{% if config.repo_url and "github.com" in config.repo_url %} {% if "github" not in cookies %} {% set _ = cookies.update({ "github": "GitHub" }) %} {% endif %}