mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-11-07 11:39:22 +00:00
Merge branch 'main' into feature/client-language-redirect
This commit is contained in:
90 files changed
+2214
-1641
No files matched your search
@@ -17,8 +17,18 @@
|
||||
{{ end }}
|
||||
|
||||
{{/* Metadata */}}
|
||||
{{ with (.Params.Summary | default .Params.Description) | default .Site.Params.description }}
|
||||
<meta name="description" content="{{ . }}">
|
||||
{{ $metaDescriptionOrder := .Site.Params.seo.metaDescriptionOrder | default (slice "summary" "description" "site") }}
|
||||
{{ $metaDescriptionSources := dict
|
||||
"summary" .Params.Summary
|
||||
"description" .Params.Description
|
||||
"site" .Site.Params.description
|
||||
}}
|
||||
{{ $metaDescription := "" }}
|
||||
{{ range $metaDescriptionOrder }}
|
||||
{{ $metaDescription = $metaDescription | default (index $metaDescriptionSources (lower .)) }}
|
||||
{{ end }}
|
||||
{{ with $metaDescription }}
|
||||
<meta name="description" content="{{ . | plainify }}">
|
||||
{{ end }}
|
||||
{{ with .Params.Tags | default .Site.Params.keywords }}
|
||||
<meta name="keywords" content="{{ range . }}{{ . }},{{ end }}">
|
||||
@@ -32,7 +42,7 @@
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
{{ if .IsTranslated }}
|
||||
{{ range .AllTranslations }}
|
||||
{{ $hreflang := .Language.LanguageCode | default .Language.Lang }}
|
||||
{{ $hreflang := .Language.Locale | default .Language.Lang }}
|
||||
{{ if $hreflang }}
|
||||
<link rel="alternate" hreflang="{{ $hreflang }}" href="{{ .Permalink }}">
|
||||
{{ end }}
|
||||
@@ -155,7 +165,9 @@
|
||||
{{ $jsResources = $jsResources | append (resources.Get "js/scroll-to-top.js") }}
|
||||
{{ end }}
|
||||
{{ if .Site.Params.enableSearch | default false }}
|
||||
{{ $jsResources = $jsResources | append (resources.Get "lib/fuse/fuse.min.js") | append (resources.Get "js/search.js") }}
|
||||
{{ $fuseRaw := resources.Get "lib/fuse/fuse.min.cjs" }}
|
||||
{{ $fuse := resources.FromString "lib/fuse/fuse.min.js" (replace $fuseRaw.Content "module.exports=" "window.Fuse=") }}
|
||||
{{ $jsResources = $jsResources | append $fuse | append (resources.Get "js/search.js") }}
|
||||
{{ end }}
|
||||
{{ if .Site.Params.enableCodeCopy | default false }}
|
||||
{{ $jsResources = $jsResources | append (resources.Get "js/code.js") }}
|
||||
|
||||
Reference in new issue
Block a user