aboutsummaryrefslogtreecommitdiff
path: root/templates/macros/head.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/macros/head.html')
-rw-r--r--templates/macros/head.html240
1 files changed, 107 insertions, 133 deletions
diff --git a/templates/macros/head.html b/templates/macros/head.html
index 528577a..3767a16 100644
--- a/templates/macros/head.html
+++ b/templates/macros/head.html
@@ -1,20 +1,24 @@
{#- Theme Switcher Button to toggle between dark/light #}
{%- macro theme(config) %}
- {%- if config.extra.js_theme %}
- {%- if config.extra.js_themeButton or config.extra.js_bundle %}
- <script src="{{ get_url(path=config.extra.js_theme, trailing_slash=false) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.js_theme, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ {%- if config.extra.js_switcher | default(value=true) %}
+ {%- set js_theme=config.extra.js_theme | default(value="theme.min.js") -%}
+ {%- if js_theme %}
+ <script src="{{ get_url(path=js_theme, trailing_slash=false) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path=js_theme, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- endif %}
{%- endif %}
{%- endmacro %}
-{%- macro stylesheets(config) %}
- {%- if config.extra.stylesheets %}{%- for i in config.extra.stylesheets %}
+
+{%- macro stylesheets(config) %}
+ {%- set stylesheets=config.extra.stylesheets | default(value=[ "abridge.css" ]) -%}
+ {%- if stylesheets %}{%- for i in stylesheets %}
<link rel="stylesheet" href="{{ get_url(path=i, trailing_slash=false, cachebust=true) | safe }}" />
{%- endfor %}{%- endif %}
-
{%- endmacro %}
+
+
{%- macro stylesheets_preload(config) %}
{%- if config.extra.fonts %}{%- for i in config.extra.fonts %}
@@ -31,10 +35,11 @@
{%- if config.extra.math or page.extra.math %}
- {%- if config.extra.katex_css %}{%- if config.extra.katex_css is matching("^http[s]?://") %}
- <link rel="preload" as="style" class="preStyle" href="{{ config.extra.katex_css | safe }}"{%- if config.extra.integrity %} integrity="sha384-ZPe7yZ91iWxYumsBEOn7ieg8q/o+qh/hQpSaPow8T6BwALcXSCS6C6fSRPIAnTQs"{%- endif %} crossorigin="anonymous" />
+ {%- set katex_css=config.extra.katex_css | default(value="katex.min.css") -%}
+ {%- if katex_css %}{%- if katex_css is matching("^http[s]?://") %}
+ <link rel="preload" as="style" class="preStyle" href="{{ katex_css | safe }}"{%- if config.extra.integrity | default(value=true) and config.extra.katex_css_integrity %} integrity="{{ config.extra.katex_css_integrity | safe }}"{%- endif %} crossorigin="anonymous" />
{%- else %}
- <link rel="preload" as="style" class="preStyle" href="{{ get_url(path=config.extra.katex_css, trailing_slash=false) }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.katex_css, sha_type=384, base64=true) | safe }}"{%- endif %} />
+ <link rel="preload" as="style" class="preStyle" href="{{ get_url(path=katex_css, trailing_slash=false) }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path=katex_css, sha_type=384, base64=true) | safe }}"{%- endif %} />
{%- endif %}{%- endif %}
{%- endif %}
@@ -51,7 +56,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
{%- macro js(config) %}
+ {%- set search_library=config.extra.search_library | default(value="elasticlunr") -%}
{%- set preStyle = false %}
@@ -66,141 +85,60 @@
{%- endif %}
{%- if config.extra.math or page.extra.math %}
- {%- if config.extra.katex_css %}
+ {%- set katex_css=config.extra.katex_css | default(value="katex.min.css") -%}
+ {%- if katex_css %}
{%- set preStyle = true %}
{%- endif %}
{%- endif %}
-{%- if config.extra.js_bundle and config.build_search_index or config.extra.js_bundle and config.extra.search_library %}
-
- {%- if config.extra.js_search_facade %}
- {#- dont load the index #}
- {%- elif config.extra.search_library == "tinysearch" or config.extra.search_library == "stork" %}
- {#- dont load the index #}
- {%- elif config.extra.js_search_index %}
- <script defer src="{{ get_url(path=config.extra.js_search_index, trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.js_search_index, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- endif %}
-
- {%- if not config.extra.js_search_facade %}
+{%- if config.extra.js_bundle %}
+ <script defer src="{{ get_url(path='abridge.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path='abridge.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- if config.extra.js_switcher %}
- <script defer src="{{ get_url(path='abridge-bundle-nofacade.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='abridge-bundle-nofacade.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- else %}
- <script defer src="{{ get_url(path='abridge-bundle-noswitcher.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='abridge-bundle-nofacade.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- endif %}
-
- {%- elif config.extra.search_library == "tinysearch" %}
- <script defer src="{{ get_url(path='abridge-bundle-tinysearch.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='abridge-bundle-tinysearch.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- elif config.extra.search_library == "stork" %}
- <script defer src="{{ get_url(path='abridge-bundle-stork.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='abridge-bundle-stork.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- else %}
-
- {%- if config.extra.js_switcher %}
- <script defer src="{{ get_url(path='abridge-bundle.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='abridge-bundle.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- else %}
- <script defer src="{{ get_url(path='abridge.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='abridge.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- endif %}
-
- {%- endif %}
-
-
-{%- elif config.build_search_index or config.extra.search_library %}
-
- {#- no bundle #}
+{%- else %}
{%- if preStyle == true %}
- {%- if config.extra.js_prestyle %}
- <script defer src="{{ get_url(path=config.extra.js_prestyle, trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.js_prestyle, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ {%- set js_prestyle=config.extra.js_prestyle | default(value="prestyle.js") -%}
+ {%- if js_prestyle %}
+ <script defer src="{{ get_url(path=js_prestyle, trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path=js_prestyle, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- endif %}
{%- endif %}
- {%- if config.extra.js_theme %}
- {%- if config.extra.js_themeButton %}
- <script defer src="{{ get_url(path=config.extra.js_themeButton, trailing_slash=false) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.js_themeButton, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ {%- if config.extra.js_switcher | default(value=true) %}
+ {%- set js_theme=config.extra.js_theme | default(value="theme.min.js") -%}
+ {%- if js_theme %}
+ {%- set js_themeButton=config.extra.js_themeButton | default(value="theme_button.js") -%}
+ {%- if js_themeButton %}
+ <script defer src="{{ get_url(path=js_themeButton, trailing_slash=false) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path=js_themeButton, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- endif %}
{%- endif %}
-
- {%- if config.extra.js_email %}
- {%- if config.extra.social.mail_encode %}
- <script defer src="{{ get_url(path=config.extra.js_email, trzailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.js_email, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- endif %}
- {%- endif %}
-
- {%- if config.extra.js_codecopy %}
- <script defer src="{{ get_url(path=config.extra.js_codecopy, trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.js_codecopy, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- endif %}
- {%- if config.extra.js_search_facade %}
- {%- if config.extra.search_library %}
- {%- if config.extra.search_library == "tinysearch" %}
- <script defer src="{{ get_url(path='search_facade_tinysearch.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='search_facade_tinysearch.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- elif config.extra.search_library == "stork" %}
- <script defer src="{{ get_url(path='search_facade_stork.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='search_facade_stork.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ {%- set js_email=config.extra.js_email | default(value="email.js") -%}
+ {%- if js_email %}
+ {%- if config.extra.social.mail_encode | default(value=true) %}
+ <script defer src="{{ get_url(path=js_email, trzailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path=js_email, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- endif %}
{%- endif %}
- <script defer src="{{ get_url(path='search_facade.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='search_facade.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- endif %}
- {%- if config.extra.js_search_facade or config.extra.search_library %}
- {#- dont load the index/search #}
- {%- elif config.extra.js_search_index %}
- <script defer src="{{ get_url(path=config.extra.js_search_index, trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.js_search_index, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ {%- set js_codecopy=config.extra.js_codecopy | default(value="codecopy.js") -%}
+ {%- if js_codecopy %}
+ <script defer src="{{ get_url(path=js_codecopy, trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path=js_codecopy, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- endif %}
- {%- if config.extra.js_search_facade %}
- {#- dont load the index/search #}
- {%- else %}
- {%- if config.extra.search_library == "tinysearch" %}
- <script defer type="module" src="{{ get_url(path='tinysearch.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='tinysearch.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- elif config.extra.search_library == "stork" %}
- <script defer type="module" src="{{ get_url(path='stork.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='stork.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ {%- if search_library == "tinysearch" %}
+ <script defer type="module" src="{{ get_url(path='tinysearch.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path='tinysearch.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ {%- elif search_library == "stork" %}
+ <script defer type="module" src="{{ get_url(path='stork.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path='stork.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- else %}
- <script defer src="{{ get_url(path='elasticlunr.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='elasticlunr.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- <script defer src="{{ get_url(path='search.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='search.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- endif %}
+ <script defer src="{{ get_url(path='elasticlunr.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path='elasticlunr.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ <script defer src="{{ get_url(path='search.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path='search.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- endif %}
-{%- elif config.extra.js_bundle %}
-
- {#- no search #}
-
- {%- if config.extra.js_switcher %}
-
- <script defer src="{{ get_url(path='abridge-bundle-nosearch.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='abridge-bundle-nosearch.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- else %}
-
- <script defer src="{{ get_url(path='abridge-bundle-noswitchernosearch.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path='abridge-bundle-noswitchernosearch.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- endif %}
-
-{%- else %}
-
- {#- no bundle or search #}
-
- {%- if preStyle == true %}
- {%- if config.extra.js_prestyle %}
- <script defer src="{{ get_url(path=config.extra.js_prestyle, trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.js_prestyle, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- endif %}
- {%- endif %}
-
- {%- if config.extra.js_theme %}
- {%- if config.extra.js_themeButton or config.extra.js_bundle %}
- <script defer src="{{ get_url(path=config.extra.js_themeButton, trailing_slash=false) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.js_themeButton, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- endif %}
- {%- endif %}
-
- {%- if config.extra.js_email %}
- {%- if config.extra.social.mail_encode %}
- <script defer src="{{ get_url(path=config.extra.js_email, trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.js_email, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- endif %}
- {%- endif %}
+{%- endif %}
- {%- if config.extra.js_codecopy %}
- <script defer src="{{ get_url(path=config.extra.js_codecopy, trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.js_codecopy, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- endif %}
-{%- endif %}
{#- https://katex.org/docs/autorender.html #}
@@ -208,31 +146,38 @@
{#- https://github.com/KaTeX/KaTeX/tree/main/contrib/mathtex-script-type/ #}
{%- if config.extra.math or page.extra.math %}
-{%- if config.extra.katex_bundle %}
- <script defer src="{{ get_url(path=config.extra.katex_bundle, trailing_slash=false, cachebust=true) }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.katex_bundle, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+{%- set katex_bundle=config.extra.katex_bundle | default(value="katexbundle.min.js") -%}
+{%- if katex_bundle %}
+ <script defer src="{{ get_url(path=katex_bundle, trailing_slash=false, cachebust=true) }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path=katex_bundle, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- else %}
- {%- if config.extra.katex_js %}{%- if config.extra.katex_js is matching("^http[s]?://") %}
- <script defer src="{{ config.extra.katex_js | safe }}"{%- if config.extra.integrity %} integrity="sha384-ljao5I1l+8KYFXG7LNEA7DyaFvuvSCmedUf6Y6JI7LJqiu8q5dEivP2nDdFH31V4"{%- endif %} crossorigin="anonymous"></script>
+ {%- set katex_js=config.extra.katex_js | default(value="katex.min.js") -%}
+ {%- if katex_js %}{%- if katex_js is matching("^http[s]?://") %}
+ <script defer src="{{ katex_js | safe }}"{%- if config.extra.integrity | default(value=true) and config.extra.katex_js_integrity %} integrity="{{ config.extra.katex_js_integrity | safe }}"{%- endif %} crossorigin="anonymous"></script>
{%- else %}
- <script defer src="{{ get_url(path=config.extra.katex_js, trailing_slash=false, cachebust=true) }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.katex_js, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ <script defer src="{{ get_url(path=katex_js, trailing_slash=false, cachebust=true) }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path=katex_js, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- endif %}{%- endif %}
- {%- if config.extra.mathtex_js %}{%- if config.extra.mathtex_js is matching("^http[s]?://") %}
- <script defer src="{{ config.extra.mathtex_js | safe }}"{%- if config.extra.integrity %} integrity="sha384-jiBVvJ8NGGj5n7kJaiWwWp9AjC+Yh8rhZY3GtAX8yU28azcLgoRo4oukO87g7zDT"{%- endif %} crossorigin="anonymous"></script>
+ {%- set mathtex_js=config.extra.mathtex_js | default(value="mathtex-script-type.min.js") -%}
+ {%- if mathtex_js %}{%- if mathtex_js is matching("^http[s]?://") %}
+ <script defer src="{{ mathtex_js | safe }}"{%- if config.extra.integrity | default(value=true) and config.extra.mathtex_js_integrity %} integrity="{{ config.extra.mathtex_js_integrity | safe }}"{%- endif %} crossorigin="anonymous"></script>
{%- else %}
- <script defer src="{{ get_url(path=config.extra.mathtex_js, trailing_slash=false, cachebust=true) }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.mathtex_js, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ <script defer src="{{ get_url(path=mathtex_js, trailing_slash=false, cachebust=true) }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path=mathtex_js, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- endif %}{%- endif %}
{%- if config.extra.math_auto_render or page.extra.math_auto_render %}
- {%- if config.extra.katex_autorender_js %}
- {%- if config.extra.katex_autorender_js is matching("^http[s]?://") %}
- <script defer src="{{ config.extra.katex_autorender_js | safe }}"{%- if config.extra.integrity %} integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR"{%- endif %} crossorigin="anonymous"></script>
+ {%- set katex_autorender_js=config.extra.katex_autorender_js | default(value="auto-render.min.js") -%}
+ {%- if katex_autorender_js %}
+ {%- if katex_autorender_js is matching("^http[s]?://") %}
+ <script defer src="{{ katex_autorender_js | safe }}"{%- if config.extra.integrity | default(value=true) and config.extra.katex_autorender_js_integrity %} integrity="{{ config.extra.katex_autorender_js_integrity | safe }}"{%- endif %} crossorigin="anonymous"></script>
{%- else %}
- <script defer src="{{ get_url(path=config.extra.katex_autorender_js, trailing_slash=false, cachebust=true) }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.katex_autorender_js, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ <script defer src="{{ get_url(path=katex_autorender_js, trailing_slash=false, cachebust=true) }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path=katex_autorender_js, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ {%- endif %}
{%- endif %}
+ {%- set katex_options=config.extra.katex_options | default(value="katexoptions.js") -%}
+ {%- if katex_options %}
+ <script defer src="{{ get_url(path=katex_options, trailing_slash=false, cachebust=true) }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path=katex_options, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- endif %}
- <script defer src="{{ get_url(path=config.extra.katex_options, trailing_slash=false, cachebust=true) }}"{%- if config.extra.integrity %} integrity="sha384-{{ get_hash(path=config.extra.katex_options, sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- endif %}
{%- endif %}
@@ -242,6 +187,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{%- macro favicons(config) %}
{%- if config.extra.favicon_theme_color %}
<meta name="theme-color" content="{{ config.extra.favicon_theme_color }}" />
@@ -321,9 +293,11 @@
<meta name="description" content="{{ config.description }}" />
{%- endif %}
<link rel="canonical" href="{{ page_url | safe }}" />
-{%- if page.extra.keywords %}
+{%- if page.extra.keywords and config.extra.keywords %}
<meta name="keywords" content="{{ page.extra.keywords }}, {{ config.extra.keywords }}" />
-{%- else %}
+{%- elif page.extra.keywords %}
+ <meta name="keywords" content="{{ page.extra.keywords }}" />
+{%- elif config.extra.keywords %}
<meta name="keywords" content="{{ config.extra.keywords }}" />
{%- endif %}