diff options
| author | Jieiku | 2026-08-14 15:10:15 -0700 |
|---|---|---|
| committer | Jieiku | 2026-08-14 15:10:15 -0700 |
| commit | c2d72e09747a2a4abe9602e1ba49a1b4649c9d3c (patch) | |
| tree | 51a272ef184752e27bb70c07e4726dbdbbe6e237 /templates/partials/head.html | |
| parent | d52609f456f233ec0845c8a57a1e27583f0813ad (diff) | |
| download | abridge-c2d72e09747a2a4abe9602e1ba49a1b4649c9d3c.tar.gz abridge-c2d72e09747a2a4abe9602e1ba49a1b4649c9d3c.tar.bz2 abridge-c2d72e09747a2a4abe9602e1ba49a1b4649c9d3c.zip | |
Update for Zola 0.23.3
Diffstat (limited to 'templates/partials/head.html')
| -rw-r--r-- | templates/partials/head.html | 44 |
1 files changed, 16 insertions, 28 deletions
diff --git a/templates/partials/head.html b/templates/partials/head.html index 668b811..e020404 100644 --- a/templates/partials/head.html +++ b/templates/partials/head.html @@ -21,7 +21,7 @@ <link rel="stylesheet" href="{{ get_url(path=i , trailing_slash=false, cachebust=true) | safe }}" /> {%- endfor %}{%- endif %} - {%- if page.extra.stylesheets %}{%- set pagestylesheets=page.extra.stylesheets -%}{%- endif %} + {%- if page?.extra?.stylesheets %}{%- set pagestylesheets=page?.extra?.stylesheets -%}{%- endif %} {%- if pagestylesheets %}{%- for i in pagestylesheets %} <link rel="stylesheet" href="{{ get_url(path=i , trailing_slash=false, cachebust=true) | safe }}" /> {%- endfor %}{%- endif %} @@ -98,7 +98,7 @@ {%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set integrity = false %}{% endif %}{% endif %} {%- if config.extra.fonts %}{%- for i in config.extra.fonts %} - {%- if i.url is matching("^http[s]?://") %} + {%- if i.url is matching(pat="^http[s]?://") %} <link rel="preload" as="style" class="preStyle" href="{{ i.url | safe }}" crossorigin="anonymous" /> {%- else %} <link rel="preload" as="font" href="{{ get_url(path=i.url, trailing_slash=false) | safe }}" type="font/woff2" /> @@ -109,10 +109,10 @@ <link rel="preload" as="style" class="preStyle" href="{{ config.extra.fontawesome | safe }}" crossorigin="anonymous" /> {%- endif %} -{%- if config.extra.math or page.extra.math %} +{%- if config.extra.math or page?.extra?.math %} {%- set katex_css=config.extra.katex_css | default(value="katex.min.css") -%} - {%- if katex_css %}{%- if katex_css is matching("^http[s]?://") %} + {%- if katex_css %}{%- if katex_css is matching(pat="^http[s]?://") %} <link rel="preload" as="style" class="preStyle" href="{{ katex_css | safe }}"{%- if integrity 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=katex_css, trailing_slash=false) }}"{%- if integrity %} integrity="sha384-{{ get_hash(path=katex_css, sha_type=384, base64=true) | safe }}"{%- endif %} /> @@ -124,31 +124,19 @@ -{#- Rss / Atom Feed #} - - {%- if config.generate_feeds %} - {%- for feed in config.feed_filenames %} - - {%- if feed is containing('atom') %} +{#- Rss / Atom Feed -#} +{%- if config.generate_feeds -%} +{%- for feed in config.feed_filenames -%} +{%- if feed is containing(pat='atom') %} <link rel="alternate" type="application/atom+xml" title="{{ config.title }} Atom Feed" href="{{ get_url(path=feed, trailing_slash=false, lang=lang) | safe }}" /> - {%- endif %} - - {%- if feed is containing('rss') %} +{%- endif -%} +{%- if feed is containing(pat='rss') %} <link rel="alternate" type="application/rss+xml" title="{{ config.title }} RSS Feed" href="{{ get_url(path=feed, trailing_slash=false, lang=lang) | safe }}" /> - {%- endif %} - - {%- endfor %} - {%- endif %} - - - - - -{#- Extra items #} - {%- if config.extra.head_extra %} +{%- endif -%} +{%- endfor -%} +{%- endif -%} +{#- Extra items -#} +{%- if config.extra.head_extra %} {{ config.extra.head_extra | safe }} - {%- endif %} - - - +{%- endif -%} {#- End of head partial -#} |
