Merge branch 'adityatelange:master' into toc-on-the-side
This commit is contained in:
commit
070019aa08
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
@ -7,6 +7,11 @@ on:
|
|||||||
- exampleSite
|
- exampleSite
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
# manual run
|
# manual run
|
||||||
|
inputs:
|
||||||
|
hugoVersion:
|
||||||
|
description: "Hugo Version"
|
||||||
|
required: false
|
||||||
|
default: "0.83.0"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -26,7 +31,7 @@ jobs:
|
|||||||
- name: Setup hugo
|
- name: Setup hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v2
|
||||||
with:
|
with:
|
||||||
hugo-version: '0.83.0'
|
hugo-version: "${{ github.event.inputs.hugoVersion }}"
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: hugo --buildDrafts --gc --verbose --minify
|
run: hugo --buildDrafts --gc --verbose --minify
|
||||||
|
13
.github/workflows/gh-pages.yml
vendored
13
.github/workflows/gh-pages.yml
vendored
@ -3,14 +3,19 @@ name: Build GH-Pages
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'images/**'
|
- "images/**"
|
||||||
- 'LICENSE'
|
- "LICENSE"
|
||||||
- 'README.md'
|
- "README.md"
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- exampleSite
|
- exampleSite
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
# manual run
|
# manual run
|
||||||
|
inputs:
|
||||||
|
hugoVersion:
|
||||||
|
description: "Hugo Version"
|
||||||
|
required: false
|
||||||
|
default: "0.83.0"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
@ -30,7 +35,7 @@ jobs:
|
|||||||
- name: Setup hugo
|
- name: Setup hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v2
|
||||||
with:
|
with:
|
||||||
hugo-version: '0.83.0'
|
hugo-version: "${{ github.event.inputs.hugoVersion }}"
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: hugo --buildDrafts --gc --verbose --minify
|
run: hugo --buildDrafts --gc --verbose --minify
|
||||||
|
@ -153,8 +153,7 @@
|
|||||||
border-radius: var(--radius);
|
border-radius: var(--radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-content .highlight:not(table),
|
.post-content .highlight:not(table) {
|
||||||
.post-content pre {
|
|
||||||
margin: 10px auto;
|
margin: 10px auto;
|
||||||
background: var(--hljs-bg) !important;
|
background: var(--hljs-bg) !important;
|
||||||
border-radius: var(--radius);
|
border-radius: var(--radius);
|
||||||
@ -207,8 +206,8 @@
|
|||||||
margin: auto 0;
|
margin: auto 0;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
color: rgb(213, 213, 214);
|
color: rgb(213, 213, 214);
|
||||||
background: 0 0;
|
background: var(--hljs-bg) !important;
|
||||||
border-radius: 0;
|
border-radius: var(--radius);
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
28
i18n/sv.yaml
Normal file
28
i18n/sv.yaml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
- id: prev_page
|
||||||
|
translation: "Förra Sidan"
|
||||||
|
|
||||||
|
- id: next_page
|
||||||
|
translation: "Nästa Sida"
|
||||||
|
|
||||||
|
- id: read_time
|
||||||
|
translation:
|
||||||
|
one: "1 min"
|
||||||
|
other: "{{ .Count }} min"
|
||||||
|
|
||||||
|
- id: toc
|
||||||
|
translation: "Innehållsförteckning"
|
||||||
|
|
||||||
|
- id: translations
|
||||||
|
translation: "Översättningar"
|
||||||
|
|
||||||
|
- id: home
|
||||||
|
translation: "Hem"
|
||||||
|
|
||||||
|
- id: edit_post
|
||||||
|
translation: "Redigera"
|
||||||
|
|
||||||
|
- id: code_copy
|
||||||
|
translation: "kopiera"
|
||||||
|
|
||||||
|
- id: code_copied
|
||||||
|
translation: "kopierad!"
|
@ -9,6 +9,11 @@
|
|||||||
one : "1 分鐘"
|
one : "1 分鐘"
|
||||||
other: "{{ .Count }} 分鐘"
|
other: "{{ .Count }} 分鐘"
|
||||||
|
|
||||||
|
- id: words
|
||||||
|
translation:
|
||||||
|
one: "字"
|
||||||
|
other: "{{ .Count }} 字"
|
||||||
|
|
||||||
- id: toc
|
- id: toc
|
||||||
translation: "目錄"
|
translation: "目錄"
|
||||||
|
|
||||||
|
@ -9,6 +9,11 @@
|
|||||||
one : "1 分钟"
|
one : "1 分钟"
|
||||||
other: "{{ .Count }} 分钟"
|
other: "{{ .Count }} 分钟"
|
||||||
|
|
||||||
|
- id: words
|
||||||
|
translation:
|
||||||
|
one: "字"
|
||||||
|
other: "{{ .Count }} 字"
|
||||||
|
|
||||||
- id: toc
|
- id: toc
|
||||||
translation: "目录"
|
translation: "目录"
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
|
{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
|
||||||
|
|
||||||
{{- if .Site.Params.ShowAllPagesInArchive }}
|
{{- if site.Params.ShowAllPagesInArchive }}
|
||||||
{{- $pages = site.RegularPages }}
|
{{- $pages = site.RegularPages }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{{ .Site.Language }}" dir="{{ .Language.LanguageDirection | default "auto" }}">
|
<html lang="{{ site.Language }}" dir="{{ .Language.LanguageDirection | default "auto" }}">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
{{- partial "head.html" . }}
|
{{- partial "head.html" . }}
|
||||||
@ -9,7 +9,7 @@
|
|||||||
{{- if (or (ne .Kind `page` ) (eq .Layout `archives`) (eq .Layout `search`)) -}}
|
{{- if (or (ne .Kind `page` ) (eq .Layout `archives`) (eq .Layout `search`)) -}}
|
||||||
{{- print "list" -}}
|
{{- print "list" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if eq $.Site.Params.defaultTheme `dark` -}}
|
{{- if eq site.Params.defaultTheme `dark` -}}
|
||||||
{{- print " dark" }}
|
{{- print " dark" }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
" id="top">
|
" id="top">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{{- $.Scratch.Add "index" slice -}}
|
{{- $.Scratch.Add "index" slice -}}
|
||||||
{{- range .Site.RegularPages -}}
|
{{- range site.RegularPages -}}
|
||||||
{{- if and (not .Params.searchHidden) (ne .Layout `archives`) (ne .Layout `search`) }}
|
{{- if and (not .Params.searchHidden) (ne .Layout `archives`) (ne .Layout `search`) }}
|
||||||
{{- $.Scratch.Add "index" (dict "title" .Title "content" .Plain "permalink" .Permalink "summary" .Summary) -}}
|
{{- $.Scratch.Add "index" (dict "title" .Title "content" .Plain "permalink" .Permalink "summary" .Summary) -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{{- define "main" }}
|
{{- define "main" }}
|
||||||
|
|
||||||
{{- if (and .Site.Params.profileMode.enabled .IsHome) }}
|
{{- if (and site.Params.profileMode.enabled .IsHome) }}
|
||||||
{{- partial "index_profile.html" . }}
|
{{- partial "index_profile.html" . }}
|
||||||
{{- else }} {{/* if not profileMode */}}
|
{{- else }} {{/* if not profileMode */}}
|
||||||
|
|
||||||
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
{{- $paginator := .Paginate $pages }}
|
{{- $paginator := .Paginate $pages }}
|
||||||
|
|
||||||
{{- if and .IsHome .Site.Params.homeInfoParams (eq $paginator.PageNumber 1) }}
|
{{- if and .IsHome site.Params.homeInfoParams (eq $paginator.PageNumber 1) }}
|
||||||
{{- partial "home_info.html" . }}
|
{{- partial "home_info.html" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
{{- $class := "post-entry" }}
|
{{- $class := "post-entry" }}
|
||||||
|
|
||||||
{{- $user_preferred := or .Site.Params.disableSpecial1stPost .Site.Params.homeInfoParams }}
|
{{- $user_preferred := or site.Params.disableSpecial1stPost site.Params.homeInfoParams }}
|
||||||
{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) (not $user_preferred)) }}
|
{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) (not $user_preferred)) }}
|
||||||
{{- $class = "first-entry" }}
|
{{- $class = "first-entry" }}
|
||||||
{{- else if $term }}
|
{{- else if $term }}
|
||||||
@ -49,7 +49,7 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
<article class="{{ $class }}">
|
<article class="{{ $class }}">
|
||||||
{{- $isHidden := (.Site.Params.cover.hidden | default .Site.Params.cover.hiddenInList) }}
|
{{- $isHidden := (site.Params.cover.hidden | default site.Params.cover.hiddenInList) }}
|
||||||
{{- partial "cover.html" (dict "cxt" . "IsHome" true "isHidden" $isHidden) }}
|
{{- partial "cover.html" (dict "cxt" . "IsHome" true "isHidden" $isHidden) }}
|
||||||
<header class="entry-header">
|
<header class="entry-header">
|
||||||
<h2>
|
<h2>
|
||||||
|
@ -1,31 +1,31 @@
|
|||||||
{{- $pctx := . -}}
|
{{- $pctx := . -}}
|
||||||
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
|
{{- if .IsHome -}}{{ $pctx = site }}{{- end -}}
|
||||||
{{- $pages := slice -}}
|
{{- $pages := slice -}}
|
||||||
{{- if or $.IsHome $.IsSection -}}
|
{{- if or $.IsHome $.IsSection -}}
|
||||||
{{- $pages = $pctx.RegularPages -}}
|
{{- $pages = $pctx.RegularPages -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $pages = $pctx.Pages -}}
|
{{- $pages = $pctx.Pages -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
{{- $limit := site.Config.Services.RSS.Limit -}}
|
||||||
{{- if ge $limit 1 -}}
|
{{- if ge $limit 1 -}}
|
||||||
{{- $pages = $pages | first $limit -}}
|
{{- $pages = $pages | first $limit -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
|
||||||
<channel>
|
<channel>
|
||||||
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
<title>{{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ site.Title }}{{ end }}</title>
|
||||||
<link>{{ .Permalink }}</link>
|
<link>{{ .Permalink }}</link>
|
||||||
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
<description>Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ site.Title }}</description>
|
||||||
{{- with $.Site.Params.images }}
|
{{- with site.Params.images }}
|
||||||
<image>
|
<image>
|
||||||
<url>{{ index . 0 | absURL }}</url>
|
<url>{{ index . 0 | absURL }}</url>
|
||||||
<link>{{ index . 0 | absURL }}</link>
|
<link>{{ index . 0 | absURL }}</link>
|
||||||
</image>
|
</image>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
<generator>Hugo -- gohugo.io</generator>{{ with site.LanguageCode }}
|
||||||
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
|
<language>{{.}}</language>{{end}}{{ with site.Author.email }}
|
||||||
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
|
<managingEditor>{{.}}{{ with site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with site.Author.email }}
|
||||||
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
<webMaster>{{.}}{{ with site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with site.Copyright }}
|
||||||
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
||||||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||||
{{- with .OutputFormats.Get "RSS" -}}
|
{{- with .OutputFormats.Get "RSS" -}}
|
||||||
@ -37,10 +37,10 @@
|
|||||||
<title>{{ .Title }}</title>
|
<title>{{ .Title }}</title>
|
||||||
<link>{{ .Permalink }}</link>
|
<link>{{ .Permalink }}</link>
|
||||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
{{ with site.Author.email }}<author>{{.}}{{ with site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||||
<guid>{{ .Permalink }}</guid>
|
<guid>{{ .Permalink }}</guid>
|
||||||
<description>{{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}}</description>
|
<description>{{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}}</description>
|
||||||
{{- if .Site.Params.ShowFullTextinRSS }}
|
{{- if site.Params.ShowFullTextinRSS }}
|
||||||
<content:encoded>{{ (printf "<![CDATA[%s]]>" .Content) | safeHTML }}</content:encoded>
|
<content:encoded>{{ (printf "<![CDATA[%s]]>" .Content) | safeHTML }}</content:encoded>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</item>
|
</item>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</header>
|
</header>
|
||||||
{{- $isHidden := .Params.cover.hidden | default .Site.Params.cover.hiddenInSingle | default .Site.Params.cover.hidden }}
|
{{- $isHidden := .Params.cover.hidden | default site.Params.cover.hiddenInSingle | default site.Params.cover.hidden }}
|
||||||
{{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }}
|
{{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }}
|
||||||
{{- if (.Param "ShowToc") }}
|
{{- if (.Param "ShowToc") }}
|
||||||
{{- partial "toc.html" . }}
|
{{- partial "toc.html" . }}
|
||||||
@ -46,7 +46,7 @@
|
|||||||
{{- if (.Param "ShowPostNavLinks") }}
|
{{- if (.Param "ShowPostNavLinks") }}
|
||||||
{{- partial "post_nav_links.html" . }}
|
{{- partial "post_nav_links.html" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if (and .Site.Params.ShowShareButtons (ne .Params.disableShare true)) }}
|
{{- if (and site.Params.ShowShareButtons (ne .Params.disableShare true)) }}
|
||||||
{{- partial "share_icons.html" . -}}
|
{{- partial "share_icons.html" . -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
{{- range $key, $value := .Data.Terms.Alphabetical }}
|
{{- range $key, $value := .Data.Terms.Alphabetical }}
|
||||||
{{- $name := .Name }}
|
{{- $name := .Name }}
|
||||||
{{- $count := .Count }}
|
{{- $count := .Count }}
|
||||||
{{- with $.Site.GetPage (printf "/%s/%s" $type $name) }}
|
{{- with site.GetPage (printf "/%s/%s" $type $name) }}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ .Permalink }}">{{ .Name }} <sup><strong><sup>{{ $count }}</sup></strong></sup> </a>
|
<a href="{{ .Permalink }}">{{ .Name }} <sup><strong><sup>{{ $count }}</sup></strong></sup> </a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{{- if or .Params.author .Site.Params.author }}
|
{{- if or .Params.author site.Params.author }}
|
||||||
{{- $author := (.Params.author | default .Site.Params.author) }}
|
{{- $author := (.Params.author | default site.Params.author) }}
|
||||||
{{- $author_type := (printf "%T" $author) }}
|
{{- $author_type := (printf "%T" $author) }}
|
||||||
{{- if (or (eq $author_type "[]string") (eq $author_type "[]interface {}")) }}
|
{{- if (or (eq $author_type "[]string") (eq $author_type "[]interface {}")) }}
|
||||||
{{- (delimit $author ", " ) }}
|
{{- (delimit $author ", " ) }}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{{- if (.Param "ShowBreadCrumbs") -}}
|
{{- if (.Param "ShowBreadCrumbs") -}}
|
||||||
<div class="breadcrumbs">
|
<div class="breadcrumbs">
|
||||||
{{- $url := replace .Parent.Permalink (printf "%s" .Site.BaseURL) "" }}
|
{{- $url := replace .Parent.Permalink (printf "%s" site.BaseURL) "" }}
|
||||||
{{- $lang_url := strings.TrimPrefix (printf "%s/" .Lang) $url -}}
|
{{- $lang_url := strings.TrimPrefix (printf "%s/" .Lang) $url -}}
|
||||||
|
|
||||||
<a href="{{ "" | absLangURL }}">{{ i18n "home" | default "Home" }}</a>
|
<a href="{{ "" | absLangURL }}">{{ i18n "home" | default "Home" }}</a>
|
||||||
@ -8,7 +8,7 @@
|
|||||||
{{- range $index, $element := split $lang_url "/" }}
|
{{- range $index, $element := split $lang_url "/" }}
|
||||||
|
|
||||||
{{- $scratch.Add "path" (printf "%s/" $element )}}
|
{{- $scratch.Add "path" (printf "%s/" $element )}}
|
||||||
{{- $bc_pg := $.Site.GetPage ($scratch.Get "path") -}}
|
{{- $bc_pg := site.GetPage ($scratch.Get "path") -}}
|
||||||
|
|
||||||
{{- if (and ($bc_pg) (gt (len . ) 0))}}
|
{{- if (and ($bc_pg) (gt (len . ) 0))}}
|
||||||
{{- print " » " | safeHTML -}}<a href="{{ $bc_pg.Permalink }}">{{ $bc_pg.Name }}</a>
|
{{- print " » " | safeHTML -}}<a href="{{ $bc_pg.Permalink }}">{{ $bc_pg.Name }}</a>
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
{{- if (and .Params.cover.image (not $.isHidden)) }}
|
{{- if (and .Params.cover.image (not $.isHidden)) }}
|
||||||
{{- $alt := (.Params.cover.alt | default .Params.cover.caption | plainify) }}
|
{{- $alt := (.Params.cover.alt | default .Params.cover.caption | plainify) }}
|
||||||
<figure class="entry-cover">
|
<figure class="entry-cover">
|
||||||
{{- $responsiveImages := (.Params.cover.responsiveImages | default .Site.Params.cover.responsiveImages) | default true }}
|
{{- $responsiveImages := (.Params.cover.responsiveImages | default site.Params.cover.responsiveImages) | default true }}
|
||||||
{{- $addLink := (and .Site.Params.cover.linkFullImages (not $.IsHome)) }}
|
{{- $addLink := (and site.Params.cover.linkFullImages (not $.IsHome)) }}
|
||||||
{{- $cover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }}
|
{{- $cover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }}
|
||||||
{{- if $cover -}}{{/* i.e it is present in page bundle */}}
|
{{- if $cover -}}{{/* i.e it is present in page bundle */}}
|
||||||
{{- if $addLink }}<a href="{{ (path.Join .RelPermalink .Params.cover.image) | absURL }}" target="_blank"
|
{{- if $addLink }}<a href="{{ (path.Join .RelPermalink .Params.cover.image) | absURL }}" target="_blank"
|
||||||
@ -13,7 +13,7 @@
|
|||||||
{{- if hugo.IsExtended -}}
|
{{- if hugo.IsExtended -}}
|
||||||
{{- $processableFormats = $processableFormats | append "webp" -}}
|
{{- $processableFormats = $processableFormats | append "webp" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $prod := (hugo.IsProduction | or (eq .Site.Params.env "production")) }}
|
{{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }}
|
||||||
{{- if (and (in $processableFormats $cover.MediaType.SubType) ($responsiveImages) (eq $prod true)) }}
|
{{- if (and (in $processableFormats $cover.MediaType.SubType) ($responsiveImages) (eq $prod true)) }}
|
||||||
<img loading="lazy" srcset="{{- range $size := $sizes -}}
|
<img loading="lazy" srcset="{{- range $size := $sizes -}}
|
||||||
{{- if (ge $cover.Width $size) -}}
|
{{- if (ge $cover.Width $size) -}}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{{- if or .Params.editPost.URL .Site.Params.editPost.URL -}}
|
{{- if or .Params.editPost.URL site.Params.editPost.URL -}}
|
||||||
{{- $fileUrlPath := path.Join .File.Path }}
|
{{- $fileUrlPath := path.Join .File.Path }}
|
||||||
|
|
||||||
{{- if or .Params.author $.Site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated }} | {{- end -}}
|
{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated }} | {{- end -}}
|
||||||
<a href="{{ .Params.editPost.URL | default .Site.Params.editPost.URL }}{{ if .Params.editPost.appendFilePath | default ( .Site.Params.editPost.appendFilePath | default false ) }}/{{ $fileUrlPath }}{{ end }}" rel="noopener noreferrer" target="_blank">
|
<a href="{{ .Params.editPost.URL | default site.Params.editPost.URL }}{{ if .Params.editPost.appendFilePath | default ( site.Params.editPost.appendFilePath | default false ) }}/{{ $fileUrlPath }}{{ end }}" rel="noopener noreferrer" target="_blank">
|
||||||
{{- .Params.editPost.Text | default (.Site.Params.editPost.Text | default (i18n "edit_post" | default "Edit")) -}}
|
{{- .Params.editPost.Text | default (site.Params.editPost.Text | default (i18n "edit_post" | default "Edit")) -}}
|
||||||
</a>
|
</a>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{{- if not (.Param "hideFooter") }}
|
{{- if not (.Param "hideFooter") }}
|
||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
{{- if .Site.Copyright }}
|
{{- if site.Copyright }}
|
||||||
<span>{{ .Site.Copyright | markdownify }}</span>
|
<span>{{ site.Copyright | markdownify }}</span>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<span>© {{ now.Year }} <a href="{{ "" | absLangURL }}">{{ .Site.Title }}</a></span>
|
<span>© {{ now.Year }} <a href="{{ "" | absLangURL }}">{{ site.Title }}</a></span>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<span>
|
<span>
|
||||||
Powered by
|
Powered by
|
||||||
@ -13,7 +13,7 @@
|
|||||||
</footer>
|
</footer>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if (not .Site.Params.disableScrollToTop) }}
|
{{- if (not site.Params.disableScrollToTop) }}
|
||||||
<a href="#top" aria-label="go to top" title="Go to Top (Alt + G)" class="top-link" id="top-link" accesskey="g">
|
<a href="#top" aria-label="go to top" title="Go to Top (Alt + G)" class="top-link" id="top-link" accesskey="g">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6" fill="currentColor">
|
||||||
<path d="M12 6H0l6-6z" />
|
<path d="M12 6H0l6-6z" />
|
||||||
@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{{- if (not .Site.Params.disableScrollToTop) }}
|
{{- if (not site.Params.disableScrollToTop) }}
|
||||||
<script>
|
<script>
|
||||||
var mybutton = document.getElementById("top-link");
|
var mybutton = document.getElementById("top-link");
|
||||||
window.onscroll = function () {
|
window.onscroll = function () {
|
||||||
@ -69,7 +69,7 @@
|
|||||||
</script>
|
</script>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if (not .Site.Params.disableThemeToggle) }}
|
{{- if (not site.Params.disableThemeToggle) }}
|
||||||
<script>
|
<script>
|
||||||
document.getElementById("theme-toggle").addEventListener("click", () => {
|
document.getElementById("theme-toggle").addEventListener("click", () => {
|
||||||
if (document.body.className.includes("dark")) {
|
if (document.body.className.includes("dark")) {
|
||||||
|
@ -1,36 +1,36 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
{{- if hugo.IsProduction | or (eq .Site.Params.env "production") }}
|
{{- if hugo.IsProduction | or (eq site.Params.env "production") }}
|
||||||
<meta name="robots" content="index, follow">
|
<meta name="robots" content="index, follow">
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<meta name="robots" content="noindex, nofollow">
|
<meta name="robots" content="noindex, nofollow">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- /* Title */}}
|
{{- /* Title */}}
|
||||||
<title>{{ if .IsHome }}{{ else }}{{ if .Title }}{{ .Title }} | {{ end }}{{ end }}{{ .Site.Title }}</title>
|
<title>{{ if .IsHome }}{{ else }}{{ if .Title }}{{ .Title }} | {{ end }}{{ end }}{{ site.Title }}</title>
|
||||||
|
|
||||||
{{- /* Meta */}}
|
{{- /* Meta */}}
|
||||||
{{- if .IsHome }}
|
{{- if .IsHome }}
|
||||||
{{ with .Site.Params.keywords -}}<meta name="keywords" content="{{- range $i, $e := . }}{{ if $i }}, {{ end }}{{ $e }}{{ end }}" />{{ end }}
|
{{ with site.Params.keywords -}}<meta name="keywords" content="{{- range $i, $e := . }}{{ if $i }}, {{ end }}{{ $e }}{{ end }}">{{ end }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<meta name="keywords" content="{{ if .Params.keywords -}}
|
<meta name="keywords" content="{{ if .Params.keywords -}}
|
||||||
{{- range $i, $e := .Params.keywords }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{- else }}
|
{{- range $i, $e := .Params.keywords }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{- else }}
|
||||||
{{- range $i, $e := .Params.tags }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{- end -}}" />
|
{{- range $i, $e := .Params.tags }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{- end -}}">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<meta name="description" content="{{- with .Description }}{{ . }}{{- else }}{{- if or .IsPage .IsSection}}
|
<meta name="description" content="{{- with .Description }}{{ . }}{{- else }}{{- if or .IsPage .IsSection}}
|
||||||
{{- .Summary | default (printf "%s - %s" .Title .Site.Title) }}{{- else }}
|
{{- .Summary | default (printf "%s - %s" .Title site.Title) }}{{- else }}
|
||||||
{{- with .Site.Params.description }}{{ . }}{{- end }}{{- end }}{{- end -}}">
|
{{- with site.Params.description }}{{ . }}{{- end }}{{- end }}{{- end -}}">
|
||||||
<meta name="author" content="{{ (partial "author.html" . ) }}">
|
<meta name="author" content="{{ (partial "author.html" . ) }}">
|
||||||
<link rel="canonical" href="{{ if .Params.canonicalURL -}} {{ trim .Params.canonicalURL " " }} {{- else -}} {{ .Permalink }} {{- end }}" />
|
<link rel="canonical" href="{{ if .Params.canonicalURL -}} {{ trim .Params.canonicalURL " " }} {{- else -}} {{ .Permalink }} {{- end }}">
|
||||||
{{- if .Site.Params.analytics.google.SiteVerificationTag }}
|
{{- if site.Params.analytics.googlesiteVerificationTag }}
|
||||||
<meta name="google-site-verification" content="{{ .Site.Params.analytics.google.SiteVerificationTag }}" />
|
<meta name="google-site-verification" content="{{ site.Params.analytics.googlesiteVerificationTag }}">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Site.Params.analytics.yandex.SiteVerificationTag }}
|
{{- if site.Params.analytics.yandexsiteVerificationTag }}
|
||||||
<meta name="yandex-verification" content="{{ .Site.Params.analytics.yandex.SiteVerificationTag }}" />
|
<meta name="yandex-verification" content="{{ site.Params.analytics.yandexsiteVerificationTag }}">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Site.Params.analytics.bing.SiteVerificationTag }}
|
{{- if site.Params.analytics.bingsiteVerificationTag }}
|
||||||
<meta name="msvalidate.01" content="{{ .Site.Params.analytics.bing.SiteVerificationTag }}" />
|
<meta name="msvalidate.01" content="{{ site.Params.analytics.bingsiteVerificationTag }}">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- /* Styles */}}
|
{{- /* Styles */}}
|
||||||
@ -40,7 +40,7 @@
|
|||||||
{{- $common := (resources.Match "css/common/*.css") | resources.Concat "assets/css/common.css" }}
|
{{- $common := (resources.Match "css/common/*.css") | resources.Concat "assets/css/common.css" }}
|
||||||
|
|
||||||
{{- /* include `an-old-hope` if hljs is on */}}
|
{{- /* include `an-old-hope` if hljs is on */}}
|
||||||
{{- $isHLJSdisabled := (.Site.Params.assets.disableHLJS | default false) }}
|
{{- $isHLJSdisabled := (site.Params.assets.disableHLJS | default false) }}
|
||||||
{{- $hljs := (cond ($isHLJSdisabled) (" " | resources.FromString "assets/css/hljs-blank.css") (resources.Get "css/hljs/an-old-hope.min.css")) }}
|
{{- $hljs := (cond ($isHLJSdisabled) (" " | resources.FromString "assets/css/hljs-blank.css") (resources.Get "css/hljs/an-old-hope.min.css")) }}
|
||||||
|
|
||||||
{{- /* order is important */}}
|
{{- /* order is important */}}
|
||||||
@ -51,29 +51,19 @@
|
|||||||
{{- /* Add extended css after theme style */ -}}
|
{{- /* Add extended css after theme style */ -}}
|
||||||
{{- $stylesheet := (slice $core $extended) | resources.Concat "assets/css/stylesheet.css" | minify }}
|
{{- $stylesheet := (slice $core $extended) | resources.Concat "assets/css/stylesheet.css" | minify }}
|
||||||
|
|
||||||
{{- if not .Site.Params.assets.disableFingerprinting }}
|
{{- if not site.Params.assets.disableFingerprinting }}
|
||||||
{{- $stylesheet := $stylesheet | fingerprint }}
|
{{- $stylesheet := $stylesheet | fingerprint }}
|
||||||
<link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet" as="style">
|
<link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet" as="style">
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink }}" rel="preload stylesheet" as="style">
|
<link crossorigin="anonymous" href="{{ $stylesheet.RelPermalink }}" rel="preload stylesheet" as="style">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- with .Site.Params.profileMode }}
|
|
||||||
{{- if and .enabled .imageUrl $.IsHome }}
|
|
||||||
<link rel="preload" href="{{ .imageUrl }}" as="image">
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- with .Site.Params.label.icon }}
|
|
||||||
<link rel="preload" href="{{ . }}" as="image">
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- /* Search */}}
|
{{- /* Search */}}
|
||||||
{{- if (eq .Layout `search`) -}}
|
{{- if (eq .Layout `search`) -}}
|
||||||
<link crossorigin="anonymous" rel="preload" as="fetch" href="../index.json">
|
<link crossorigin="anonymous" rel="preload" as="fetch" href="../index.json">
|
||||||
{{- $fastsearch := resources.Get "js/fastsearch.js" | js.Build (dict "params" (dict "fuseOpts" .Site.Params.fuseOpts)) }}
|
{{- $fastsearch := resources.Get "js/fastsearch.js" | js.Build (dict "params" (dict "fuseOpts" site.Params.fuseOpts)) }}
|
||||||
{{- $fusejs := resources.Get "js/fuse.basic.min.js" }}
|
{{- $fusejs := resources.Get "js/fuse.basic.min.js" }}
|
||||||
{{- if not .Site.Params.assets.disableFingerprinting }}
|
{{- if not site.Params.assets.disableFingerprinting }}
|
||||||
{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify | fingerprint }}
|
{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify | fingerprint }}
|
||||||
<script defer crossorigin="anonymous" src="{{ $search.RelPermalink }}" integrity="{{ $search.Data.Integrity }}"></script>
|
<script defer crossorigin="anonymous" src="{{ $search.RelPermalink }}" integrity="{{ $search.Data.Integrity }}"></script>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
@ -83,9 +73,9 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- /* Highlight.js */}}
|
{{- /* Highlight.js */}}
|
||||||
{{- $isHLJSdisabled := (.Site.Params.assets.disableHLJS | default .Params.disableHLJS ) }}
|
{{- $isHLJSdisabled := (site.Params.assets.disableHLJS | default .Params.disableHLJS ) }}
|
||||||
{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (not $isHLJSdisabled)) }}
|
{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (not $isHLJSdisabled)) }}
|
||||||
{{- if not .Site.Params.assets.disableFingerprinting }}
|
{{- if not site.Params.assets.disableFingerprinting }}
|
||||||
{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint }}
|
{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint }}
|
||||||
<script defer crossorigin="anonymous" src="{{ $highlight.RelPermalink }}" integrity="{{ $highlight.Data.Integrity }}"
|
<script defer crossorigin="anonymous" src="{{ $highlight.RelPermalink }}" integrity="{{ $highlight.Data.Integrity }}"
|
||||||
onload="hljs.initHighlightingOnLoad();"></script>
|
onload="hljs.initHighlightingOnLoad();"></script>
|
||||||
@ -96,23 +86,20 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- /* Favicons */}}
|
{{- /* Favicons */}}
|
||||||
<link rel="icon" href="{{ .Site.Params.assets.favicon | default "favicon.ico" | absURL }}">
|
<link rel="icon" href="{{ site.Params.assets.favicon | default "favicon.ico" | absURL }}">
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ .Site.Params.assets.favicon16x16 | default "favicon-16x16.png" | absURL }}">
|
<link rel="icon" type="image/png" sizes="16x16" href="{{ site.Params.assets.favicon16x16 | default "favicon-16x16.png" | absURL }}">
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="{{ .Site.Params.assets.favicon32x32 | default "favicon-32x32.png" | absURL }}">
|
<link rel="icon" type="image/png" sizes="32x32" href="{{ site.Params.assets.favicon32x32 | default "favicon-32x32.png" | absURL }}">
|
||||||
<link rel="apple-touch-icon" href="{{ .Site.Params.assets.apple_touch_icon | default "apple-touch-icon.png" | absURL }}">
|
<link rel="apple-touch-icon" href="{{ site.Params.assets.apple_touch_icon | default "apple-touch-icon.png" | absURL }}">
|
||||||
<link rel="mask-icon" href="{{ .Site.Params.assets.safari_pinned_tab | default "safari-pinned-tab.svg" | absURL }}">
|
<link rel="mask-icon" href="{{ site.Params.assets.safari_pinned_tab | default "safari-pinned-tab.svg" | absURL }}">
|
||||||
<meta name="theme-color" content="{{ .Site.Params.assets.theme_color | default "#2e2e33" }}">
|
<meta name="theme-color" content="{{ site.Params.assets.theme_color | default "#2e2e33" }}">
|
||||||
<meta name="msapplication-TileColor" content="{{ .Site.Params.assets.msapplication_TileColor | default "#2e2e33" }}">
|
<meta name="msapplication-TileColor" content="{{ site.Params.assets.msapplication_TileColor | default "#2e2e33" }}">
|
||||||
|
|
||||||
{{- /* Generator */}}
|
|
||||||
{{ hugo.Generator }}
|
|
||||||
|
|
||||||
{{- /* RSS */}}
|
{{- /* RSS */}}
|
||||||
{{ range .AlternativeOutputFormats -}}
|
{{ range .AlternativeOutputFormats -}}
|
||||||
<link rel="{{ .Rel }}" type="{{ .MediaType.Type | html }}" href="{{ .Permalink | safeURL }}">
|
<link rel="{{ .Rel }}" type="{{ .MediaType.Type | html }}" href="{{ .Permalink | safeURL }}">
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{- range .AllTranslations -}}
|
{{- range .AllTranslations -}}
|
||||||
<link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}" />
|
<link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}">
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
<noscript>
|
<noscript>
|
||||||
@ -123,7 +110,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
{{- if (and (ne .Site.Params.defaultTheme "light") (ne .Site.Params.defaultTheme "dark")) }}
|
{{- if (and (ne site.Params.defaultTheme "light") (ne site.Params.defaultTheme "dark")) }}
|
||||||
<style>
|
<style>
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
:root {
|
:root {
|
||||||
@ -158,7 +145,7 @@
|
|||||||
{{- partial "extend_head.html" . -}}
|
{{- partial "extend_head.html" . -}}
|
||||||
|
|
||||||
{{- /* Misc */}}
|
{{- /* Misc */}}
|
||||||
{{- if hugo.IsProduction | or (eq .Site.Params.env "production") }}
|
{{- if hugo.IsProduction | or (eq site.Params.env "production") }}
|
||||||
{{- template "_internal/google_analytics.html" . }}
|
{{- template "_internal/google_analytics.html" . }}
|
||||||
{{- template "partials/templates/opengraph.html" . }}
|
{{- template "partials/templates/opengraph.html" . }}
|
||||||
{{- template "partials/templates/twitter_cards.html" . }}
|
{{- template "partials/templates/twitter_cards.html" . }}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{{- /* theme-toggle is enabled */}}
|
{{- /* theme-toggle is enabled */}}
|
||||||
{{- if (not .Site.Params.disableThemeToggle) }}
|
{{- if (not site.Params.disableThemeToggle) }}
|
||||||
{{- /* theme is light */}}
|
{{- /* theme is light */}}
|
||||||
{{- if (eq .Site.Params.defaultTheme "light") }}
|
{{- if (eq site.Params.defaultTheme "light") }}
|
||||||
<script>
|
<script>
|
||||||
if (localStorage.getItem("pref-theme") === "dark") {
|
if (localStorage.getItem("pref-theme") === "dark") {
|
||||||
document.body.classList.add('dark');
|
document.body.classList.add('dark');
|
||||||
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
{{- /* theme is dark */}}
|
{{- /* theme is dark */}}
|
||||||
{{- else if (eq .Site.Params.defaultTheme "dark") }}
|
{{- else if (eq site.Params.defaultTheme "dark") }}
|
||||||
<script>
|
<script>
|
||||||
if (localStorage.getItem("pref-theme") === "light") {
|
if (localStorage.getItem("pref-theme") === "light") {
|
||||||
document.body.classList.remove('dark')
|
document.body.classList.remove('dark')
|
||||||
@ -30,7 +30,7 @@
|
|||||||
</script>
|
</script>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- /* theme-toggle is disabled and theme is auto */}}
|
{{- /* theme-toggle is disabled and theme is auto */}}
|
||||||
{{- else if (and (ne .Site.Params.defaultTheme "light") (ne .Site.Params.defaultTheme "dark"))}}
|
{{- else if (and (ne site.Params.defaultTheme "light") (ne site.Params.defaultTheme "dark"))}}
|
||||||
<script>
|
<script>
|
||||||
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||||
document.body.classList.add('dark');
|
document.body.classList.add('dark');
|
||||||
@ -42,18 +42,36 @@
|
|||||||
<header class="header">
|
<header class="header">
|
||||||
<nav class="nav">
|
<nav class="nav">
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
{{- $label_text := (.Site.Params.label.text | default .Site.Title) }}
|
{{- $label_text := (site.Params.label.text | default site.Title) }}
|
||||||
{{- if .Site.Title }}
|
{{- if site.Title }}
|
||||||
<a href="{{ "" | absLangURL }}" accesskey="h" title="{{ $label_text }} (Alt + H)">
|
<a href="{{ "" | absLangURL }}" accesskey="h" title="{{ $label_text }} (Alt + H)">
|
||||||
{{- if .Site.Params.label.icon }}
|
{{- if site.Params.label.icon }}
|
||||||
<img src="{{- .Site.Params.label.icon | absURL -}}" alt="logo" aria-label="logo"
|
{{- $img := resources.Get site.Params.label.icon }}
|
||||||
height="{{- .Site.Params.label.iconHeight | default " 30px" -}}">
|
{{- if $img }}
|
||||||
|
{{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}}
|
||||||
|
{{- if hugo.IsExtended -}}
|
||||||
|
{{- $processableFormats = $processableFormats | append "webp" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }}
|
||||||
|
{{- if and (in $processableFormats $img.MediaType.SubType) (eq $prod true)}}
|
||||||
|
{{- if site.Params.label.iconHeight }}
|
||||||
|
{{- $img = $img.Resize (printf "x%d" site.Params.label.iconHeight) }}
|
||||||
|
{{ else }}
|
||||||
|
{{- $img = $img.Resize "x30" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
<img src="{{ $img.Permalink }}" alt="logo" aria-label="logo"
|
||||||
|
height="{{- site.Params.label.iconHeight | default "30" -}}">
|
||||||
|
{{- else }}
|
||||||
|
<img src="{{- site.Params.label.icon | absURL -}}" alt="logo" aria-label="logo"
|
||||||
|
height="{{- site.Params.label.iconHeight | default "30" -}}">
|
||||||
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $label_text -}}
|
{{- $label_text -}}
|
||||||
</a>
|
</a>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<span class="logo-switches">
|
<span class="logo-switches">
|
||||||
{{- if (not .Site.Params.disableThemeToggle) }}
|
{{- if (not site.Params.disableThemeToggle) }}
|
||||||
<button id="theme-toggle" accesskey="t" title="(Alt + T)">
|
<button id="theme-toggle" accesskey="t" title="(Alt + T)">
|
||||||
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
|
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"
|
||||||
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
||||||
@ -77,8 +95,8 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- $lang := .Lang}}
|
{{- $lang := .Lang}}
|
||||||
{{- $separator := or $label_text (not .Site.Params.disableThemeToggle)}}
|
{{- $separator := or $label_text (not site.Params.disableThemeToggle)}}
|
||||||
{{- with $.Site.Home.AllTranslations }}
|
{{- with site.Home.AllTranslations }}
|
||||||
<ul class="lang-switch">
|
<ul class="lang-switch">
|
||||||
{{- if $separator }}<li>|</li>{{ end }}
|
{{- if $separator }}<li>|</li>{{ end }}
|
||||||
{{- range . -}}
|
{{- range . -}}
|
||||||
@ -86,7 +104,7 @@
|
|||||||
<li>
|
<li>
|
||||||
<a href="{{- .Permalink -}}" title="{{ .Language.Params.languageAltTitle | default (.Language.LanguageName | emojify) | default (.Lang | title) }}"
|
<a href="{{- .Permalink -}}" title="{{ .Language.Params.languageAltTitle | default (.Language.LanguageName | emojify) | default (.Lang | title) }}"
|
||||||
aria-label="{{ .Language.LanguageName | default (.Lang | title) }}">
|
aria-label="{{ .Language.LanguageName | default (.Lang | title) }}">
|
||||||
{{- if (and $.Site.Params.displayFullLangName (.Language.LanguageName)) }}
|
{{- if (and site.Params.displayFullLangName (.Language.LanguageName)) }}
|
||||||
{{- .Language.LanguageName | emojify -}}
|
{{- .Language.LanguageName | emojify -}}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- .Lang | title -}}
|
{{- .Lang | title -}}
|
||||||
@ -101,10 +119,10 @@
|
|||||||
</div>
|
</div>
|
||||||
{{- $currentPage := . }}
|
{{- $currentPage := . }}
|
||||||
<ul id="menu">
|
<ul id="menu">
|
||||||
{{- range .Site.Menus.main }}
|
{{- range site.Menus.main }}
|
||||||
{{- $menu_item_url := (cond (strings.HasSuffix .URL "/") .URL (printf "%s/" .URL) ) | absLangURL }}
|
{{- $menu_item_url := (cond (strings.HasSuffix .URL "/") .URL (printf "%s/" .URL) ) | absLangURL }}
|
||||||
{{- $page_url:= $currentPage.Permalink | absLangURL }}
|
{{- $page_url:= $currentPage.Permalink | absLangURL }}
|
||||||
{{- $is_search := eq ($.Site.GetPage .KeyName).Layout `search` }}
|
{{- $is_search := eq (site.GetPage .KeyName).Layout `search` }}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ .URL | absLangURL }}" title="{{ .Title | default .Name }} {{- cond $is_search (" (Alt + /)" | safeHTMLAttr) ("" | safeHTMLAttr ) }}"
|
<a href="{{ .URL | absLangURL }}" title="{{ .Title | default .Name }} {{- cond $is_search (" (Alt + /)" | safeHTMLAttr) ("" | safeHTMLAttr ) }}"
|
||||||
{{- cond $is_search (" accesskey=/" | safeHTMLAttr) ("" | safeHTMLAttr ) }}>
|
{{- cond $is_search (" accesskey=/" | safeHTMLAttr) ("" | safeHTMLAttr ) }}>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{{- with $.Site.Params.homeInfoParams }}
|
{{- with site.Params.homeInfoParams }}
|
||||||
<article class="first-entry home-info">
|
<article class="first-entry home-info">
|
||||||
<header class="entry-header">
|
<header class="entry-header">
|
||||||
<h1>{{ .Title | markdownify }}</h1>
|
<h1>{{ .Title | markdownify }}</h1>
|
||||||
@ -7,7 +7,7 @@
|
|||||||
<p>{{ .Content | markdownify }}</p>
|
<p>{{ .Content | markdownify }}</p>
|
||||||
</section>
|
</section>
|
||||||
<footer class="entry-footer">
|
<footer class="entry-footer">
|
||||||
{{ partial "social_icons.html" $.Site.Params.socialIcons }}
|
{{ partial "social_icons.html" site.Params.socialIcons }}
|
||||||
</footer>
|
</footer>
|
||||||
</article>
|
</article>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
@ -1,13 +1,35 @@
|
|||||||
<div class="profile">
|
<div class="profile">
|
||||||
{{- with .Site.Params.profileMode }}
|
{{- with site.Params.profileMode }}
|
||||||
<div class="profile_inner">
|
<div class="profile_inner">
|
||||||
{{- if .imageUrl -}}
|
{{- if .imageUrl -}}
|
||||||
|
{{- $img := resources.Get .imageUrl }}
|
||||||
|
{{- if $img }}
|
||||||
|
{{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}}
|
||||||
|
{{- if hugo.IsExtended -}}
|
||||||
|
{{- $processableFormats = $processableFormats | append "webp" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }}
|
||||||
|
{{- if and (in $processableFormats $img.MediaType.SubType) (eq $prod true)}}
|
||||||
|
{{- if (not (and (not .imageHeight) (not .imageWidth))) }}
|
||||||
|
{{- $img = $img.Resize (printf "%dx%d" .imageWidth .imageHeight) }}
|
||||||
|
{{- else if .imageHeight }}
|
||||||
|
{{- $img = $img.Resize (printf "x%d" .imageHeight) }}
|
||||||
|
{{ else if .imageWidth }}
|
||||||
|
{{- $img = $img.Resize (printf "%dx" .imageWidth) }}
|
||||||
|
{{ else }}
|
||||||
|
{{- $img = $img.Resize "150x150" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
<img src="{{ $img.Permalink }}" alt="{{ .imageTitle | default "profile image" }}"
|
||||||
|
height="{{ .imageHeight | default 150 }}" width="{{ .imageWidth | default 150 }}" />
|
||||||
|
{{- else }}
|
||||||
<img src="{{ .imageUrl | absURL }}" alt="{{ .imageTitle | default "profile image" }}"
|
<img src="{{ .imageUrl | absURL }}" alt="{{ .imageTitle | default "profile image" }}"
|
||||||
height="{{ .imageHeight | default 150 }}" width="{{ .imageWidth | default 150 }}" />
|
height="{{ .imageHeight | default 150 }}" width="{{ .imageWidth | default 150 }}" />
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<h1>{{ .title | default $.Site.Title | markdownify }}</h1>
|
{{- end }}
|
||||||
|
<h1>{{ .title | default site.Title | markdownify }}</h1>
|
||||||
<span>{{ .subtitle | markdownify }}</span>
|
<span>{{ .subtitle | markdownify }}</span>
|
||||||
{{- partial "social_icons.html" $.Site.Params.socialIcons -}}
|
{{- partial "social_icons.html" site.Params.socialIcons -}}
|
||||||
|
|
||||||
{{- with .buttons }}
|
{{- with .buttons }}
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{{ if and (.Params.canonicalURL) (.Params.ShowCanonicalLink ) -}}
|
{{ if and (.Params.canonicalURL) (.Params.ShowCanonicalLink ) -}}
|
||||||
{{ $url := urls.Parse .Params.canonicalURL }}
|
{{ $url := urls.Parse .Params.canonicalURL }}
|
||||||
|
|
||||||
{{- if or .Params.author $.Site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated (or .Params.editPost.URL .Site.Params.editPost.URL) }} | {{- end -}}
|
{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated (or .Params.editPost.URL site.Params.editPost.URL) }} | {{- end -}}
|
||||||
<span>
|
<span>
|
||||||
{{- (.Site.Params.CanonicalLinkText | default .Params.CanonicalLinkText) | default "Originally published at" -}}
|
{{- (site.Params.CanonicalLinkText | default .Params.CanonicalLinkText) | default "Originally published at" -}}
|
||||||
<a href="{{ trim .Params.canonicalURL " " }}" title="{{ trim .Params.canonicalURL " " }}" target="_blank" rel="noopener noreferrer">{{ $url.Host }}</a>
|
<a href="{{ trim .Params.canonicalURL " " }}" title="{{ trim .Params.canonicalURL " " }}" target="_blank" rel="noopener noreferrer">{{ $url.Host }}</a>
|
||||||
</span>
|
</span>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{{- $scratch := newScratch }}
|
{{- $scratch := newScratch }}
|
||||||
|
|
||||||
{{- if not .Date.IsZero -}}
|
{{- if not .Date.IsZero -}}
|
||||||
{{- $scratch.Add "meta" (slice (printf "<span title='%s'>%s</span>" (.Date) (.Date | time.Format (default "January 2, 2006" .Site.Params.DateFormat)))) }}
|
{{- $scratch.Add "meta" (slice (printf "<span title='%s'>%s</span>" (.Date) (.Date | time.Format (default "January 2, 2006" site.Params.DateFormat)))) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if (.Param "ShowReadingTime") -}}
|
{{- if (.Param "ShowReadingTime") -}}
|
||||||
|
@ -14,6 +14,10 @@
|
|||||||
<path style="font-variation-settings:normal"
|
<path style="font-variation-settings:normal"
|
||||||
d="M6.165 16.659s3.16 1.2 4.602-.17c1.37-1.3.787-3.163-.754-4.05-1.68-.969-3.284-1.788-3.036-3.536.446-3.138 4.386-1.851 4.386-1.851M15.792 7.794v7.774c0 1.023.635 1.766 2.043 1.624M17.826 10.04h-3.582" />
|
d="M6.165 16.659s3.16 1.2 4.602-.17c1.37-1.3.787-3.163-.754-4.05-1.68-.969-3.284-1.788-3.036-3.536.446-3.138 4.386-1.851 4.386-1.851M15.792 7.794v7.774c0 1.023.635 1.766 2.043 1.624M17.826 10.04h-3.582" />
|
||||||
</svg>
|
</svg>
|
||||||
|
{{- else if (eq $icon_name "applemusic") -}}
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" stroke="none">
|
||||||
|
<path d="M23.994 6.124a9.23 9.23 0 00-.24-2.19c-.317-1.31-1.062-2.31-2.18-3.043a5.022 5.022 0 00-1.877-.726 10.496 10.496 0 00-1.564-.15c-.04-.003-.083-.01-.124-.013H5.986c-.152.01-.303.017-.455.026-.747.043-1.49.123-2.193.4-1.336.53-2.3 1.452-2.865 2.78-.192.448-.292.925-.363 1.408-.056.392-.088.785-.1 1.18 0 .032-.007.062-.01.093v12.223c.01.14.017.283.027.424.05.815.154 1.624.497 2.373.65 1.42 1.738 2.353 3.234 2.801.42.127.856.187 1.293.228.555.053 1.11.06 1.667.06h11.03a12.5 12.5 0 001.57-.1c.822-.106 1.596-.35 2.295-.81a5.046 5.046 0 001.88-2.207c.186-.42.293-.87.37-1.324.113-.675.138-1.358.137-2.04-.002-3.8 0-7.595-.003-11.393zm-6.423 3.99v5.712c0 .417-.058.827-.244 1.206-.29.59-.76.962-1.388 1.14-.35.1-.706.157-1.07.173-.95.045-1.773-.6-1.943-1.536a1.88 1.88 0 011.038-2.022c.323-.16.67-.25 1.018-.324.378-.082.758-.153 1.134-.24.274-.063.457-.23.51-.516a.904.904 0 00.02-.193c0-1.815 0-3.63-.002-5.443a.725.725 0 00-.026-.185c-.04-.15-.15-.243-.304-.234-.16.01-.318.035-.475.066-.76.15-1.52.303-2.28.456l-2.325.47-1.374.278c-.016.003-.032.01-.048.013-.277.077-.377.203-.39.49-.002.042 0 .086 0 .13-.002 2.602 0 5.204-.003 7.805 0 .42-.047.836-.215 1.227-.278.64-.77 1.04-1.434 1.233-.35.1-.71.16-1.075.172-.96.036-1.755-.6-1.92-1.544-.14-.812.23-1.685 1.154-2.075.357-.15.73-.232 1.108-.31.287-.06.575-.116.86-.177.383-.083.583-.323.6-.714v-.15c0-2.96 0-5.922.002-8.882 0-.123.013-.25.042-.37.07-.285.273-.448.546-.518.255-.066.515-.112.774-.165.733-.15 1.466-.296 2.2-.444l2.27-.46c.67-.134 1.34-.27 2.01-.403.22-.043.442-.088.663-.106.31-.025.523.17.554.482.008.073.012.148.012.223.002 1.91.002 3.822 0 5.732z"/>
|
||||||
|
</svg>
|
||||||
{{- else if (eq $icon_name "behance") -}}
|
{{- else if (eq $icon_name "behance") -}}
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||||
stroke-linecap="round" stroke-linejoin="round">
|
stroke-linecap="round" stroke-linejoin="round">
|
||||||
@ -21,6 +25,14 @@
|
|||||||
style="font-variation-settings:normal"
|
style="font-variation-settings:normal"
|
||||||
d="M1.774 18.063V5.466h5.51c1.978 0 3.116 1.326 3.055 2.806-.043 1.049-.711 2.988-2.643 2.988h-5.93H7.73c1.224 0 3.532 1.13 3.532 3.532 0 2.4-1.873 3.27-3.318 3.27zm12.57-4.459h7.89s.012-4.18-4.167-4.18c-5.237 0-5.277 9.11-.3 9.11 3.06 0 3.935-1.806 3.935-1.806M15.526 5.823h4.987" />
|
d="M1.774 18.063V5.466h5.51c1.978 0 3.116 1.326 3.055 2.806-.043 1.049-.711 2.988-2.643 2.988h-5.93H7.73c1.224 0 3.532 1.13 3.532 3.532 0 2.4-1.873 3.27-3.318 3.27zm12.57-4.459h7.89s.012-4.18-4.167-4.18c-5.237 0-5.277 9.11-.3 9.11 3.06 0 3.935-1.806 3.935-1.806M15.526 5.823h4.987" />
|
||||||
</svg>
|
</svg>
|
||||||
|
{{- else if (eq $icon_name "bilibili") -}}
|
||||||
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect x="1.3333" y="6" width="21.333" height="15.333" rx="4" ry="4"/>
|
||||||
|
<path d="m8 12.4v1.2"/>
|
||||||
|
<path d="m16 12.4v1.2"/>
|
||||||
|
<path d="m5.8853 2.6667 2.6667 2.6667"/>
|
||||||
|
<path d="m18.115 2.6667-2.6667 2.6667"/>
|
||||||
|
</svg>
|
||||||
{{- else if (eq $icon_name "buymeacoffee") -}}
|
{{- else if (eq $icon_name "buymeacoffee") -}}
|
||||||
<svg viewBox="0 0 884 1279" fill="none" stroke="currentColor" stroke-width="2" xmlns="http://www.w3.org/2000/svg">
|
<svg viewBox="0 0 884 1279" fill="none" stroke="currentColor" stroke-width="2" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M791.109 297.518L790.231 297.002L788.201 296.383C789.018 297.072 790.04 297.472 791.109 297.518Z"
|
<path d="M791.109 297.518L790.231 297.002L788.201 296.383C789.018 297.072 790.04 297.472 791.109 297.518Z"
|
||||||
@ -105,6 +117,11 @@
|
|||||||
<path
|
<path
|
||||||
d="M7.42 10.05c-.18-.16-.46-.23-.84-.23H6l.02 2.44.04 2.45.56-.02c.41 0 .63-.07.83-.26.24-.24.26-.36.26-2.2 0-1.91-.02-1.96-.29-2.18zM0 4.94v14.12h24V4.94H0zM8.56 15.3c-.44.58-1.06.77-2.53.77H4.71V8.53h1.4c1.67 0 2.16.18 2.6.9.27.43.29.6.32 2.57.05 2.23-.02 2.73-.47 3.3zm5.09-5.47h-2.47v1.77h1.52v1.28l-.72.04-.75.03v1.77l1.22.03 1.2.04v1.28h-1.6c-1.53 0-1.6-.01-1.87-.3l-.3-.28v-3.16c0-3.02.01-3.18.25-3.48.23-.31.25-.31 1.88-.31h1.64v1.3zm4.68 5.45c-.17.43-.64.79-1 .79-.18 0-.45-.15-.67-.39-.32-.32-.45-.63-.82-2.08l-.9-3.39-.45-1.67h.76c.4 0 .75.02.75.05 0 .06 1.16 4.54 1.26 4.83.04.15.32-.7.73-2.3l.66-2.52.74-.04c.4-.02.73 0 .73.04 0 .14-1.67 6.38-1.8 6.68z" />
|
d="M7.42 10.05c-.18-.16-.46-.23-.84-.23H6l.02 2.44.04 2.45.56-.02c.41 0 .63-.07.83-.26.24-.24.26-.36.26-2.2 0-1.91-.02-1.96-.29-2.18zM0 4.94v14.12h24V4.94H0zM8.56 15.3c-.44.58-1.06.77-2.53.77H4.71V8.53h1.4c1.67 0 2.16.18 2.6.9.27.43.29.6.32 2.57.05 2.23-.02 2.73-.47 3.3zm5.09-5.47h-2.47v1.77h1.52v1.28l-.72.04-.75.03v1.77l1.22.03 1.2.04v1.28h-1.6c-1.53 0-1.6-.01-1.87-.3l-.3-.28v-3.16c0-3.02.01-3.18.25-3.48.23-.31.25-.31 1.88-.31h1.64v1.3zm4.68 5.45c-.17.43-.64.79-1 .79-.18 0-.45-.15-.67-.39-.32-.32-.45-.63-.82-2.08l-.9-3.39-.45-1.67h.76c.4 0 .75.02.75.05 0 .06 1.16 4.54 1.26 4.83.04.15.32-.7.73-2.3l.66-2.52.74-.04c.4-.02.73 0 .73.04 0 .14-1.67 6.38-1.8 6.68z" />
|
||||||
</svg>
|
</svg>
|
||||||
|
{{- else if (eq $icon_name "deezer") -}}
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 20" fill="currentColor" stroke="none">
|
||||||
|
<path
|
||||||
|
d="M18.81 4.16v3.03H24V4.16h-5.19zM6.27 8.38v3.027h5.189V8.38h-5.19zm12.54 0v3.027H24V8.38h-5.19zM6.27 12.594v3.027h5.189v-3.027h-5.19zm6.271 0v3.027h5.19v-3.027h-5.19zm6.27 0v3.027H24v-3.027h-5.19zM0 16.81v3.029h5.19v-3.03H0zm6.27 0v3.029h5.189v-3.03h-5.19zm6.271 0v3.029h5.19v-3.03h-5.19zm6.27 0v3.029H24v-3.03h-5.19Z" />
|
||||||
|
</svg>
|
||||||
{{- else if (eq $icon_name "discogs") -}}
|
{{- else if (eq $icon_name "discogs") -}}
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" stroke="none">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" stroke="none">
|
||||||
<path
|
<path
|
||||||
@ -230,6 +247,10 @@
|
|||||||
<path
|
<path
|
||||||
d="M31.99 1.365C21.287 7.72.2 31.945 0 38.298v10.516C0 62.144 12.46 73.86 23.773 73.86c13.584 0 24.902-11.258 24.903-24.62 0 13.362 10.93 24.62 24.515 24.62 13.586 0 24.165-11.258 24.165-24.62 0 13.362 11.622 24.62 25.207 24.62h.246c13.586 0 25.208-11.258 25.208-24.62 0 13.362 10.58 24.62 24.164 24.62 13.585 0 24.515-11.258 24.515-24.62 0 13.362 11.32 24.62 24.903 24.62 11.313 0 23.773-11.714 23.773-25.046V38.298c-.2-6.354-21.287-30.58-31.988-36.933C180.118.197 157.056-.005 122.685 0c-34.37.003-81.228.54-90.697 1.365zm65.194 66.217a28.025 28.025 0 0 1-4.78 6.155c-5.128 5.014-12.157 8.122-19.906 8.122a28.482 28.482 0 0 1-19.948-8.126c-1.858-1.82-3.27-3.766-4.563-6.032l-.006.004c-1.292 2.27-3.092 4.215-4.954 6.037a28.5 28.5 0 0 1-19.948 8.12c-.934 0-1.906-.258-2.692-.528-1.092 11.372-1.553 22.24-1.716 30.164l-.002.045c-.02 4.024-.04 7.333-.06 11.93.21 23.86-2.363 77.334 10.52 90.473 19.964 4.655 56.7 6.775 93.555 6.788h.006c36.854-.013 73.59-2.133 93.554-6.788 12.883-13.14 10.31-66.614 10.52-90.474-.022-4.596-.04-7.905-.06-11.93l-.003-.045c-.162-7.926-.623-18.793-1.715-30.165-.786.27-1.757.528-2.692.528a28.5 28.5 0 0 1-19.948-8.12c-1.862-1.822-3.662-3.766-4.955-6.037l-.006-.004c-1.294 2.266-2.705 4.213-4.563 6.032a28.48 28.48 0 0 1-19.947 8.125c-7.748 0-14.778-3.11-19.906-8.123a28.025 28.025 0 0 1-4.78-6.155 27.99 27.99 0 0 1-4.736 6.155 28.49 28.49 0 0 1-19.95 8.124c-.27 0-.54-.012-.81-.02h-.007c-.27.008-.54.02-.813.02a28.49 28.49 0 0 1-19.95-8.123 27.992 27.992 0 0 1-4.736-6.155zm-20.486 26.49l-.002.01h.015c8.113.017 15.32 0 24.25 9.746 7.028-.737 14.372-1.105 21.722-1.094h.006c7.35-.01 14.694.357 21.723 1.094 8.93-9.747 16.137-9.73 24.25-9.746h.014l-.002-.01c3.833 0 19.166 0 29.85 30.007L210 165.244c8.504 30.624-2.723 31.373-16.727 31.4-20.768-.773-32.267-15.855-32.267-30.935-11.496 1.884-24.907 2.826-38.318 2.827h-.006c-13.412 0-26.823-.943-38.318-2.827 0 15.08-11.5 30.162-32.267 30.935-14.004-.027-25.23-.775-16.726-31.4L46.85 124.08C57.534 94.073 72.867 94.073 76.7 94.073zm45.985 23.582v.006c-.02.02-21.863 20.08-25.79 27.215l14.304-.573v12.474c0 .584 5.74.346 11.486.08h.006c5.744.266 11.485.504 11.485-.08v-12.474l14.304.573c-3.928-7.135-25.79-27.215-25.79-27.215v-.006l-.003.002z" />
|
d="M31.99 1.365C21.287 7.72.2 31.945 0 38.298v10.516C0 62.144 12.46 73.86 23.773 73.86c13.584 0 24.902-11.258 24.903-24.62 0 13.362 10.93 24.62 24.515 24.62 13.586 0 24.165-11.258 24.165-24.62 0 13.362 11.622 24.62 25.207 24.62h.246c13.586 0 25.208-11.258 25.208-24.62 0 13.362 10.58 24.62 24.164 24.62 13.585 0 24.515-11.258 24.515-24.62 0 13.362 11.32 24.62 24.903 24.62 11.313 0 23.773-11.714 23.773-25.046V38.298c-.2-6.354-21.287-30.58-31.988-36.933C180.118.197 157.056-.005 122.685 0c-34.37.003-81.228.54-90.697 1.365zm65.194 66.217a28.025 28.025 0 0 1-4.78 6.155c-5.128 5.014-12.157 8.122-19.906 8.122a28.482 28.482 0 0 1-19.948-8.126c-1.858-1.82-3.27-3.766-4.563-6.032l-.006.004c-1.292 2.27-3.092 4.215-4.954 6.037a28.5 28.5 0 0 1-19.948 8.12c-.934 0-1.906-.258-2.692-.528-1.092 11.372-1.553 22.24-1.716 30.164l-.002.045c-.02 4.024-.04 7.333-.06 11.93.21 23.86-2.363 77.334 10.52 90.473 19.964 4.655 56.7 6.775 93.555 6.788h.006c36.854-.013 73.59-2.133 93.554-6.788 12.883-13.14 10.31-66.614 10.52-90.474-.022-4.596-.04-7.905-.06-11.93l-.003-.045c-.162-7.926-.623-18.793-1.715-30.165-.786.27-1.757.528-2.692.528a28.5 28.5 0 0 1-19.948-8.12c-1.862-1.822-3.662-3.766-4.955-6.037l-.006-.004c-1.294 2.266-2.705 4.213-4.563 6.032a28.48 28.48 0 0 1-19.947 8.125c-7.748 0-14.778-3.11-19.906-8.123a28.025 28.025 0 0 1-4.78-6.155 27.99 27.99 0 0 1-4.736 6.155 28.49 28.49 0 0 1-19.95 8.124c-.27 0-.54-.012-.81-.02h-.007c-.27.008-.54.02-.813.02a28.49 28.49 0 0 1-19.95-8.123 27.992 27.992 0 0 1-4.736-6.155zm-20.486 26.49l-.002.01h.015c8.113.017 15.32 0 24.25 9.746 7.028-.737 14.372-1.105 21.722-1.094h.006c7.35-.01 14.694.357 21.723 1.094 8.93-9.747 16.137-9.73 24.25-9.746h.014l-.002-.01c3.833 0 19.166 0 29.85 30.007L210 165.244c8.504 30.624-2.723 31.373-16.727 31.4-20.768-.773-32.267-15.855-32.267-30.935-11.496 1.884-24.907 2.826-38.318 2.827h-.006c-13.412 0-26.823-.943-38.318-2.827 0 15.08-11.5 30.162-32.267 30.935-14.004-.027-25.23-.775-16.726-31.4L46.85 124.08C57.534 94.073 72.867 94.073 76.7 94.073zm45.985 23.582v.006c-.02.02-21.863 20.08-25.79 27.215l14.304-.573v12.474c0 .584 5.74.346 11.486.08h.006c5.744.266 11.485.504 11.485-.08v-12.474l14.304.573c-3.928-7.135-25.79-27.215-25.79-27.215v-.006l-.003.002z" />
|
||||||
</svg>
|
</svg>
|
||||||
|
{{- else if (eq $icon_name "kaggle") -}}
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" stroke="none" viewBox="0 0 32 32">
|
||||||
|
<path transform="matrix(.527027 0 0 .527027 -30.632288 -22.45559)" clip-path="url(#A)" d="M105.75 102.968c-.06.238-.298.357-.713.357H97.1c-.477 0-.89-.208-1.248-.625L82.746 86.028l-3.655 3.477v12.93c0 .595-.298.892-.892.892h-6.152c-.595 0-.892-.297-.892-.892V43.5c0-.593.297-.89.892-.89H78.2c.594 0 .892.298.892.89v36.288l15.692-15.87c.416-.415.832-.624 1.248-.624h8.204c.356 0 .593.15.713.445.12.357.09.624-.09.803L88.274 80.588l17.297 21.488c.237.238.297.535.18.892"/>
|
||||||
|
</svg>
|
||||||
{{- else if (eq $icon_name "kakaotalk") -}}
|
{{- else if (eq $icon_name "kakaotalk") -}}
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" stroke="none" stroke-width="2"
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" stroke="none" stroke-width="2"
|
||||||
stroke-linecap="round" stroke-linejoin="round">
|
stroke-linecap="round" stroke-linejoin="round">
|
||||||
@ -254,11 +275,19 @@
|
|||||||
<path
|
<path
|
||||||
d="M23.881 8.948c-.773-4.085-4.859-4.593-4.859-4.593H.723c-.604 0-.679.798-.679.798s-.082 7.324-.022 11.822c.164 2.424 2.586 2.672 2.586 2.672s8.267-.023 11.966-.049c2.438-.426 2.683-2.566 2.658-3.734c4.352.24 7.422-2.831 6.649-6.916zm-11.062 3.511c-1.246 1.453-4.011 3.976-4.011 3.976s-.121.119-.31.023c-.076-.057-.108-.09-.108-.09c-.443-.441-3.368-3.049-4.034-3.954c-.709-.965-1.041-2.7-.091-3.71c.951-1.01 3.005-1.086 4.363.407c0 0 1.565-1.782 3.468-.963c1.904.82 1.832 3.011.723 4.311zm6.173.478c-.928.116-1.682.028-1.682.028V7.284h1.77s1.971.551 1.971 2.638c0 1.913-.985 2.667-2.059 3.015z" />
|
d="M23.881 8.948c-.773-4.085-4.859-4.593-4.859-4.593H.723c-.604 0-.679.798-.679.798s-.082 7.324-.022 11.822c.164 2.424 2.586 2.672 2.586 2.672s8.267-.023 11.966-.049c2.438-.426 2.683-2.566 2.658-3.734c4.352.24 7.422-2.831 6.649-6.916zm-11.062 3.511c-1.246 1.453-4.011 3.976-4.011 3.976s-.121.119-.31.023c-.076-.057-.108-.09-.108-.09c-.443-.441-3.368-3.049-4.034-3.954c-.709-.965-1.041-2.7-.091-3.71c.951-1.01 3.005-1.086 4.363.407c0 0 1.565-1.782 3.468-.963c1.904.82 1.832 3.011.723 4.311zm6.173.478c-.928.116-1.682.028-1.682.028V7.284h1.77s1.971.551 1.971 2.638c0 1.913-.985 2.667-2.059 3.015z" />
|
||||||
</svg>
|
</svg>
|
||||||
|
{{- else if (eq $icon_name "komoot") -}}
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="3">
|
||||||
|
<path d="M24 2.5A21.5 21.5 0 0 0 7.17 37.38l10.22-10.22a7.32 7.32 0 0 1 11.79-8.34h0a7.32 7.32 0 0 1 1.43 8.34l10.22 10.22A21.5 21.5 0 0 0 24 2.5Zm0 25L10.64 40.82a21.41 21.41 0 0 0 26.72 0Z"/>
|
||||||
|
</svg>
|
||||||
{{- else if (eq $icon_name "lastfm") -}}
|
{{- else if (eq $icon_name "lastfm") -}}
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" stroke="none">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" stroke="none">
|
||||||
<path
|
<path
|
||||||
d="M10.599 17.211l-.881-2.393s-1.433 1.596-3.579 1.596c-1.9 0-3.249-1.652-3.249-4.296 0-3.385 1.708-4.596 3.388-4.596 2.418 0 3.184 1.568 3.845 3.578l.871 2.751c.871 2.672 2.523 4.818 7.285 4.818 3.41 0 5.722-1.045 5.722-3.801 0-2.227-1.276-3.383-3.635-3.935l-1.757-.384c-1.217-.274-1.577-.771-1.577-1.597 0-.936.736-1.487 1.952-1.487 1.323 0 2.028.495 2.147 1.679l2.749-.33c-.225-2.479-1.937-3.494-4.745-3.494-2.479 0-4.897.936-4.897 3.934 0 1.873.902 3.058 3.185 3.605l1.862.443c1.397.33 1.863.916 1.863 1.713 0 1.021-.992 1.441-2.869 1.441-2.779 0-3.936-1.457-4.597-3.469l-.901-2.75c-1.156-3.574-3.004-4.896-6.669-4.896C2.147 5.327 0 7.879 0 12.235c0 4.179 2.147 6.445 6.003 6.445 3.108 0 4.596-1.457 4.596-1.457v-.012z" />
|
d="M10.599 17.211l-.881-2.393s-1.433 1.596-3.579 1.596c-1.9 0-3.249-1.652-3.249-4.296 0-3.385 1.708-4.596 3.388-4.596 2.418 0 3.184 1.568 3.845 3.578l.871 2.751c.871 2.672 2.523 4.818 7.285 4.818 3.41 0 5.722-1.045 5.722-3.801 0-2.227-1.276-3.383-3.635-3.935l-1.757-.384c-1.217-.274-1.577-.771-1.577-1.597 0-.936.736-1.487 1.952-1.487 1.323 0 2.028.495 2.147 1.679l2.749-.33c-.225-2.479-1.937-3.494-4.745-3.494-2.479 0-4.897.936-4.897 3.934 0 1.873.902 3.058 3.185 3.605l1.862.443c1.397.33 1.863.916 1.863 1.713 0 1.021-.992 1.441-2.869 1.441-2.779 0-3.936-1.457-4.597-3.469l-.901-2.75c-1.156-3.574-3.004-4.896-6.669-4.896C2.147 5.327 0 7.879 0 12.235c0 4.179 2.147 6.445 6.003 6.445 3.108 0 4.596-1.457 4.596-1.457v-.012z" />
|
||||||
</svg>
|
</svg>
|
||||||
|
{{- else if (eq $icon_name "letterboxd") -}}
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"fill="currentColor">
|
||||||
|
<path d="M11.052 22.339V9.599H8.729V6.401h8.438v3.198h-2.328v12.766h5.234v-3.49h3.781v6.724H8.729v-3.26zM0 16c0 8.839 7.161 16 16 16s16-7.161 16-16S24.839 0 16 0S0 7.161 0 16z"/>
|
||||||
|
</svg>
|
||||||
{{- else if (eq $icon_name "liberapay") -}}
|
{{- else if (eq $icon_name "liberapay") -}}
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80" fill="currentColor">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80" fill="currentColor">
|
||||||
<g transform="translate(-78.37-208.06)">
|
<g transform="translate(-78.37-208.06)">
|
||||||
@ -322,6 +351,12 @@
|
|||||||
d="M7.144 19.532l1.049-5.751c.11-.606.691-1.002 1.304-.948 2.155.192 6.877.1 8.818-4.002 2.554-5.397-.59-7.769-6.295-7.769H7.43a1.97 1.97 0 0 0-1.944 1.655L2.77 19.507a.857.857 0 0 0 .846.994h2.368a1.18 1.18 0 0 0 1.161-.969zM7.967 22.522a.74.74 0 0 0 .666.416h2.313c.492 0 .923-.351 1.003-.837l.759-4.601c.095-.523.597-.866 1.127-.819 1.86.166 5.567-.118 6.85-3.821.554-1.6.705-2.954.408-4.018"
|
d="M7.144 19.532l1.049-5.751c.11-.606.691-1.002 1.304-.948 2.155.192 6.877.1 8.818-4.002 2.554-5.397-.59-7.769-6.295-7.769H7.43a1.97 1.97 0 0 0-1.944 1.655L2.77 19.507a.857.857 0 0 0 .846.994h2.368a1.18 1.18 0 0 0 1.161-.969zM7.967 22.522a.74.74 0 0 0 .666.416h2.313c.492 0 .923-.351 1.003-.837l.759-4.601c.095-.523.597-.866 1.127-.819 1.86.166 5.567-.118 6.85-3.821.554-1.6.705-2.954.408-4.018"
|
||||||
style="font-variation-settings:normal" stroke="currentColor" stroke-linejoin="miter" />
|
style="font-variation-settings:normal" stroke="currentColor" stroke-linejoin="miter" />
|
||||||
</svg>
|
</svg>
|
||||||
|
{{- else if or (eq $icon_name "pgpkey") (eq $icon_name "key") -}}
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||||
|
stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path d="M8 18l2-2h2l1.36-1.36a6.5 6.5 0 1 0-3.997-3.992L2 18v4h4l2-2v-2z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<circle cx="17" cy="7" r="1" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
{{- else if (eq $icon_name "phone") -}}
|
{{- else if (eq $icon_name "phone") -}}
|
||||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<rect x="9" y="4" width="6" height="1" rx="0.5" fill="currentColor"/>
|
<rect x="9" y="4" width="6" height="1" rx="0.5" fill="currentColor"/>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<meta property="og:title" content="{{ .Title }}" />
|
<meta property="og:title" content="{{ .Title }}" />
|
||||||
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
|
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
|
||||||
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
|
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
|
||||||
<meta property="og:url" content="{{ .Permalink }}" />
|
<meta property="og:url" content="{{ .Permalink }}" />
|
||||||
{{- if .Params.cover.image -}}
|
{{- if .Params.cover.image -}}
|
||||||
@ -19,7 +19,7 @@
|
|||||||
{{- with $featured -}}
|
{{- with $featured -}}
|
||||||
<meta property="og:image" content="{{ $featured.Permalink }}"/>
|
<meta property="og:image" content="{{ $featured.Permalink }}"/>
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- with $.Site.Params.images }}<meta property="og:image" content="{{ index . 0 | absURL }}"/>{{ end -}}
|
{{- with site.Params.images }}<meta property="og:image" content="{{ index . 0 | absURL }}"/>{{ end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@ -33,14 +33,14 @@
|
|||||||
|
|
||||||
{{- with .Params.audio }}<meta property="og:audio" content="{{ . }}" />{{ end }}
|
{{- with .Params.audio }}<meta property="og:audio" content="{{ . }}" />{{ end }}
|
||||||
{{- with .Params.locale }}<meta property="og:locale" content="{{ . }}" />{{ end }}
|
{{- with .Params.locale }}<meta property="og:locale" content="{{ . }}" />{{ end }}
|
||||||
{{- with .Site.Params.title }}<meta property="og:site_name" content="{{ . }}" />{{ end }}
|
{{- with site.Params.title }}<meta property="og:site_name" content="{{ . }}" />{{ end }}
|
||||||
{{- with .Params.videos }}{{- range . }}
|
{{- with .Params.videos }}{{- range . }}
|
||||||
<meta property="og:video" content="{{ . | absURL }}" />
|
<meta property="og:video" content="{{ . | absURL }}" />
|
||||||
{{ end }}{{ end }}
|
{{ end }}{{ end }}
|
||||||
|
|
||||||
{{- /* If it is part of a series, link to related articles */}}
|
{{- /* If it is part of a series, link to related articles */}}
|
||||||
{{- $permalink := .Permalink }}
|
{{- $permalink := .Permalink }}
|
||||||
{{- $siteSeries := .Site.Taxonomies.series }}
|
{{- $siteSeries := site.Taxonomies.series }}
|
||||||
{{ with .Params.series }}{{- range $name := . }}
|
{{ with .Params.series }}{{- range $name := . }}
|
||||||
{{- $series := index $siteSeries ($name | urlize) }}
|
{{- $series := index $siteSeries ($name | urlize) }}
|
||||||
{{- range $page := first 6 $series.Pages }}
|
{{- range $page := first 6 $series.Pages }}
|
||||||
@ -49,4 +49,4 @@
|
|||||||
{{ end }}{{ end }}
|
{{ end }}{{ end }}
|
||||||
|
|
||||||
{{- /* Facebook Page Admin ID for Domain Insights */}}
|
{{- /* Facebook Page Admin ID for Domain Insights */}}
|
||||||
{{- with .Site.Social.facebook_admin }}<meta property="fb:admins" content="{{ . }}" />{{ end }}
|
{{- with site.Social.facebook_admin }}<meta property="fb:admins" content="{{ . }}" />{{ end }}
|
||||||
|
@ -2,23 +2,23 @@
|
|||||||
<script type="application/ld+json">
|
<script type="application/ld+json">
|
||||||
{
|
{
|
||||||
"@context": "https://schema.org",
|
"@context": "https://schema.org",
|
||||||
"@type": "{{- ( .Site.Params.schema.publisherType | default "Organization") | title -}}",
|
"@type": "{{- ( site.Params.schema.publisherType | default "Organization") | title -}}",
|
||||||
"name": {{ .Site.Title }},
|
"name": {{ site.Title }},
|
||||||
"url": {{ .Site.BaseURL }},
|
"url": {{ site.BaseURL }},
|
||||||
"description": {{ .Site.Params.description | plainify | truncate 180 | safeHTML }},
|
"description": {{ site.Params.description | plainify | truncate 180 | safeHTML }},
|
||||||
"thumbnailUrl": {{ .Site.Params.assets.favicon | default "favicon.ico" | absURL }},
|
"thumbnailUrl": {{ site.Params.assets.favicon | default "favicon.ico" | absURL }},
|
||||||
"sameAs": [
|
"sameAs": [
|
||||||
{{- if .Site.Params.schema.sameAs }}
|
{{- if site.Params.schema.sameAs }}
|
||||||
{{ range $i, $e := .Site.Params.schema.sameAs }}{{ if $i }}, {{ end }}{{ trim $e " " }}{{ end }}
|
{{ range $i, $e := site.Params.schema.sameAs }}{{ if $i }}, {{ end }}{{ trim $e " " }}{{ end }}
|
||||||
{{- else}}
|
{{- else}}
|
||||||
{{ range $i, $e := .Site.Params.SocialIcons }}{{ if $i }}, {{ end }}{{ trim $e.url " " }}{{ end }}
|
{{ range $i, $e := site.Params.SocialIcons }}{{ if $i }}, {{ end }}{{ trim $e.url " " }}{{ end }}
|
||||||
{{- end}}
|
{{- end}}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{{- else if (or .IsPage .IsSection) }}
|
{{- else if (or .IsPage .IsSection) }}
|
||||||
{{/* BreadcrumbList */}}
|
{{/* BreadcrumbList */}}
|
||||||
{{- $url := replace .Parent.Permalink ( printf "%s" .Site.BaseURL) "" }}
|
{{- $url := replace .Parent.Permalink ( printf "%s" site.BaseURL) "" }}
|
||||||
{{- $lang_url := strings.TrimPrefix ( printf "%s/" .Lang) $url }}
|
{{- $lang_url := strings.TrimPrefix ( printf "%s/" .Lang) $url }}
|
||||||
{{- $bc_list := (split $lang_url "/")}}
|
{{- $bc_list := (split $lang_url "/")}}
|
||||||
|
|
||||||
@ -31,7 +31,7 @@
|
|||||||
{{- range $index, $element := $bc_list }}
|
{{- range $index, $element := $bc_list }}
|
||||||
|
|
||||||
{{- $scratch.Add "path" (printf "%s/" $element ) | safeJS }}
|
{{- $scratch.Add "path" (printf "%s/" $element ) | safeJS }}
|
||||||
{{- $bc_pg := $.Site.GetPage ($scratch.Get "path") -}}
|
{{- $bc_pg := site.GetPage ($scratch.Get "path") -}}
|
||||||
|
|
||||||
{{- if (and ($bc_pg) (gt (len . ) 0))}}
|
{{- if (and ($bc_pg) (gt (len . ) 0))}}
|
||||||
{{- if (and $index)}}, {{end }}
|
{{- if (and $index)}}, {{end }}
|
||||||
@ -83,7 +83,7 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
"datePublished": {{ .PublishDate }},
|
"datePublished": {{ .PublishDate }},
|
||||||
"dateModified": {{ .Lastmod }},
|
"dateModified": {{ .Lastmod }},
|
||||||
{{- with (.Params.author | default .Site.Params.author) }}
|
{{- with (.Params.author | default site.Params.author) }}
|
||||||
"author":
|
"author":
|
||||||
{{- if (or (eq (printf "%T" .) "[]string") (eq (printf "%T" .) "[]interface {}")) -}}
|
{{- if (or (eq (printf "%T" .) "[]string") (eq (printf "%T" .) "[]interface {}")) -}}
|
||||||
[{{- range $i, $v := . -}}
|
[{{- range $i, $v := . -}}
|
||||||
@ -105,11 +105,11 @@
|
|||||||
"@id": {{ .Permalink | safeHTML }}
|
"@id": {{ .Permalink | safeHTML }}
|
||||||
},
|
},
|
||||||
"publisher": {
|
"publisher": {
|
||||||
"@type": "{{- ( .Site.Params.schema.publisherType | default "Organization") | title -}}",
|
"@type": "{{- ( site.Params.schema.publisherType | default "Organization") | title -}}",
|
||||||
"name": {{ .Site.Title }},
|
"name": {{ site.Title }},
|
||||||
"logo": {
|
"logo": {
|
||||||
"@type": "ImageObject",
|
"@type": "ImageObject",
|
||||||
"url": {{ .Site.Params.assets.favicon | default "favicon.ico" | absURL }}
|
"url": {{ site.Params.assets.favicon | default "favicon.ico" | absURL }}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<meta name="twitter:card" content="summary_large_image"/>
|
<meta name="twitter:card" content="summary_large_image"/>
|
||||||
<meta name="twitter:image" content="{{ $featured.Permalink }}"/>
|
<meta name="twitter:image" content="{{ $featured.Permalink }}"/>
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- with $.Site.Params.images -}}
|
{{- with site.Params.images -}}
|
||||||
<meta name="twitter:card" content="summary_large_image"/>
|
<meta name="twitter:card" content="summary_large_image"/>
|
||||||
<meta name="twitter:image" content="{{ index . 0 | absURL }}"/>
|
<meta name="twitter:image" content="{{ index . 0 | absURL }}"/>
|
||||||
{{ else -}}
|
{{ else -}}
|
||||||
@ -27,7 +27,7 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<meta name="twitter:title" content="{{ .Title }}"/>
|
<meta name="twitter:title" content="{{ .Title }}"/>
|
||||||
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}"/>
|
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}"/>
|
||||||
{{ with .Site.Social.twitter -}}
|
{{ with site.Social.twitter -}}
|
||||||
<meta name="twitter:site" content="@{{ . }}"/>
|
<meta name="twitter:site" content="@{{ . }}"/>
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
{{- if .IsTranslated -}}
|
{{- if .IsTranslated -}}
|
||||||
{{- if (ne .Layout "search") }}
|
{{- if (ne .Layout "search") }}
|
||||||
{{- if or .Params.author $.Site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) }} | {{- end -}}
|
{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) }} | {{- end -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<ul class="i18n_list">
|
<ul class="i18n_list">
|
||||||
{{- i18n "translations" | default "Translations" }}:
|
{{- i18n "translations" | default "Translations" }}:
|
||||||
{{- range .Translations }}
|
{{- range .Translations }}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ .Permalink }}">
|
<a href="{{ .Permalink }}">
|
||||||
{{- if (and $.Site.Params.displayFullLangName (.Language.LanguageName)) }}
|
{{- if (and site.Params.displayFullLangName (.Language.LanguageName)) }}
|
||||||
{{- .Language.LanguageName | emojify -}}
|
{{- .Language.LanguageName | emojify -}}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- .Lang | title -}}
|
{{- .Lang | title -}}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
User-agent: *
|
User-agent: *
|
||||||
{{- if hugo.IsProduction | or (eq .Site.Params.env "production") }}
|
{{- if hugo.IsProduction | or (eq site.Params.env "production") }}
|
||||||
Disallow:
|
Disallow:
|
||||||
{{- else }}
|
{{- else }}
|
||||||
Disallow: /
|
Disallow: /
|
||||||
|
Loading…
x
Reference in New Issue
Block a user