Guard against repo_url being None in MkDocs 1.4

This commit is contained in:
Oleh Prypin 2022-09-29 16:55:17 +02:00 committed by Martin Donath
parent 8b0060cdad
commit 98c32aa24d
2 changed files with 2 additions and 2 deletions

View File

@ -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 %}

View File

@ -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 %}