- {{- range .Pages }}
+ {{- range .Pages }}
{{- if eq .Kind "page" }}
{{- .Title | markdownify }}
+ {{- if .Draft }} [draft] {{- end }}
{{- partial "post_meta.html" . -}}
@@ -35,4 +46,4 @@
{{- end }}
{{- end }}
-{{- end }}{{/* end main */}}
+{{- end }}{{/* end main */}}
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 6036e19..3d13f07 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,24 +1,23 @@
-
+
{{- partial "head.html" . }}
- {{- partialCached "header.html" . .Page}}
+ {{- partialCached "header.html" . .Page -}}
- {{- block "main" . }}
- {{- end }}
+ {{- block "main" . }}{{ end }}
- {{- partialCached "footer.html" . .Type }}
+ {{ partialCached "footer.html" . .Layout .Kind (.Param "hideFooter") (.Param "ShowCodeCopyButtons") -}}
diff --git a/layouts/_default/index.json b/layouts/_default/index.json
new file mode 100644
index 0000000..feeb437
--- /dev/null
+++ b/layouts/_default/index.json
@@ -0,0 +1,7 @@
+{{- $.Scratch.Add "index" slice -}}
+{{- range site.RegularPages -}}
+ {{- if and (not .Params.searchHidden) (ne .Layout `archives`) (ne .Layout `search`) }}
+ {{- $.Scratch.Add "index" (dict "title" .Title "content" .Plain "permalink" .Permalink "summary" .Summary) -}}
+ {{- end }}
+{{- end -}}
+{{- $.Scratch.Get "index" | jsonify -}}
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 9d88391..b82e1bb 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,52 +1,90 @@
{{- define "main" }}
-{{- if (and .Site.Params.profileMode.enabled .IsHome) }}
+{{- if (and site.Params.profileMode.enabled .IsHome) }}
{{- partial "index_profile.html" . }}
{{- else }} {{/* if not profileMode */}}
{{- if not .IsHome | and .Title }}
{{- end }}
+{{- if .Content }}
+
+ {{- if not (.Param "disableAnchoredHeadings") }}
+ {{- partial "anchored_headings.html" .Content -}}
+ {{- else }}{{ .Content }}{{ end }}
+
+{{- end }}
+
{{- $pages := union .RegularPages .Sections }}
{{- if .IsHome }}
{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
-{{- end}}
+{{- $pages = where $pages "Params.hiddenInHomeList" "!=" "true" }}
+{{- end }}
-{{ $paginator := .Paginate $pages }}
-{{ $term := .Data.Term}}
+{{- $paginator := .Paginate $pages }}
+
+{{- if and .IsHome site.Params.homeInfoParams (eq $paginator.PageNumber 1) }}
+{{- partial "home_info.html" . }}
+{{- end }}
+
+{{- $term := .Data.Term }}
{{- range $index, $page := $paginator.Pages }}
{{- $class := "post-entry" }}
-{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0)) }}
-{{- if .Site.Params.homeInfoParams | or .Site.Params.disableSpecial1stPost}}
-{{- partial "home_info.html" . }}
-{{- else}}
+
+{{- $user_preferred := or site.Params.disableSpecial1stPost site.Params.homeInfoParams }}
+{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) (not $user_preferred)) }}
{{- $class = "first-entry" }}
-{{- end }}
{{- else if $term }}
{{- $class = "post-entry tag-entry" }}
{{- end }}
+
- {{- partial "cover.html" (dict "cxt" . "IsHome" true) }}
+ {{- $isHidden := (site.Params.cover.hidden | default site.Params.cover.hiddenInList) }}
+ {{- partial "cover.html" (dict "cxt" . "IsHome" true "isHidden" $isHidden) }}
- {{- if (ne .Site.Params.hideSummary true)}}
-
- {{ .Summary | plainify | htmlUnescape }}...
-
+ {{- if (ne (.Param "hideSummary") true) }}
+
+
{{ .Summary | plainify | htmlUnescape }}{{ if .Truncated }}...{{ end }}
+
{{- end }}
+ {{- if not (.Param "hideMeta") }}
+<<<<<<< HEAD
+=======
+ {{- end }}
+
+>>>>>>> d3d90be8a4ea04433d95d02a1dc07b0014c5b8b8
{{- end }}
@@ -54,13 +92,25 @@
{{- end }}
-{{end}}{{/* end profileMode */}}
-{{- end }}{{- /* end main */ -}}
+
+{{- end }}{{/* end profileMode */}}
+
+{{- end }}{{- /* end main */ -}}
diff --git a/layouts/_default/list.html.orig b/layouts/_default/list.html.orig
new file mode 100644
index 0000000..b82e1bb
--- /dev/null
+++ b/layouts/_default/list.html.orig
@@ -0,0 +1,116 @@
+{{- define "main" }}
+
+{{- if (and site.Params.profileMode.enabled .IsHome) }}
+{{- partial "index_profile.html" . }}
+{{- else }} {{/* if not profileMode */}}
+
+{{- if not .IsHome | and .Title }}
+
+{{- end }}
+
+{{- if .Content }}
+
+ {{- if not (.Param "disableAnchoredHeadings") }}
+ {{- partial "anchored_headings.html" .Content -}}
+ {{- else }}{{ .Content }}{{ end }}
+
+{{- end }}
+
+{{- $pages := union .RegularPages .Sections }}
+
+{{- if .IsHome }}
+{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
+{{- $pages = where $pages "Params.hiddenInHomeList" "!=" "true" }}
+{{- end }}
+
+{{- $paginator := .Paginate $pages }}
+
+{{- if and .IsHome site.Params.homeInfoParams (eq $paginator.PageNumber 1) }}
+{{- partial "home_info.html" . }}
+{{- end }}
+
+{{- $term := .Data.Term }}
+{{- range $index, $page := $paginator.Pages }}
+
+{{- $class := "post-entry" }}
+
+{{- $user_preferred := or site.Params.disableSpecial1stPost site.Params.homeInfoParams }}
+{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) (not $user_preferred)) }}
+{{- $class = "first-entry" }}
+{{- else if $term }}
+{{- $class = "post-entry tag-entry" }}
+{{- end }}
+
+
+ {{- $isHidden := (site.Params.cover.hidden | default site.Params.cover.hiddenInList) }}
+ {{- partial "cover.html" (dict "cxt" . "IsHome" true "isHidden" $isHidden) }}
+
+ {{- if (ne (.Param "hideSummary") true) }}
+
+
{{ .Summary | plainify | htmlUnescape }}{{ if .Truncated }}...{{ end }}
+
+ {{- end }}
+ {{- if not (.Param "hideMeta") }}
+
+<<<<<<< HEAD
+
+=======
+ {{- end }}
+
+>>>>>>> d3d90be8a4ea04433d95d02a1dc07b0014c5b8b8
+
+{{- end }}
+
+{{- if gt $paginator.TotalPages 1 }}
+
+{{- end }}
+
+{{- end }}{{/* end profileMode */}}
+
+{{- end }}{{- /* end main */ -}}
diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml
new file mode 100644
index 0000000..134d50d
--- /dev/null
+++ b/layouts/_default/rss.xml
@@ -0,0 +1,50 @@
+{{- $pctx := . -}}
+{{- if .IsHome -}}{{ $pctx = site }}{{- end -}}
+{{- $pages := slice -}}
+{{- if or $.IsHome $.IsSection -}}
+{{- $pages = $pctx.RegularPages -}}
+{{- else -}}
+{{- $pages = $pctx.Pages -}}
+{{- end -}}
+{{- $limit := site.Config.Services.RSS.Limit -}}
+{{- if ge $limit 1 -}}
+{{- $pages = $pages | first $limit -}}
+{{- end -}}
+{{- printf "" | safeHTML }}
+
+
+ {{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ site.Title }}{{ end }}
+ {{ .Permalink }}
+ Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ site.Title }}
+ {{- with site.Params.images }}
+
+ {{ index . 0 | absURL }}
+ {{ index . 0 | absURL }}
+
+ {{- end }}
+ Hugo -- gohugo.io {{ with site.LanguageCode }}
+ {{.}} {{end}}{{ with site.Author.email }}
+ {{.}}{{ with site.Author.name }} ({{.}}){{end}} {{end}}{{ with site.Author.email }}
+ {{.}}{{ with site.Author.name }} ({{.}}){{end}} {{end}}{{ with site.Copyright }}
+ {{.}} {{end}}{{ if not .Date.IsZero }}
+ {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ end }}
+ {{- with .OutputFormats.Get "RSS" -}}
+ {{ printf " " .Permalink .MediaType | safeHTML }}
+ {{- end -}}
+ {{ range $pages }}
+ {{- if and (ne .Layout `search`) (ne .Layout `archives`) }}
+ -
+
{{ .Title }}
+ {{ .Permalink }}
+ {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}
+ {{ with site.Author.email }}{{.}}{{ with site.Author.name }} ({{.}}){{end}} {{end}}
+ {{ .Permalink }}
+ {{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}}
+ {{- if site.Params.ShowFullTextinRSS }}
+ {{ (printf "" .Content) | safeHTML }}
+ {{- end }}
+
+ {{- end }}
+ {{ end }}
+
+
diff --git a/layouts/_default/search.html b/layouts/_default/search.html
new file mode 100644
index 0000000..2349587
--- /dev/null
+++ b/layouts/_default/search.html
@@ -0,0 +1,29 @@
+{{- define "main" }}
+
+
+
+
+
+{{- end }}{{/* end main */}}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index dfa87e3..b807f27 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -2,13 +2,20 @@
- {{- partial "cover.html" (dict "cxt" . "IsHome" false) }}
- {{- if .Params.ShowToc }}
-
-
-
- {{- i18n "toc" | default "Table of Contents" }}
-
-
- {{- partial "toc.html" . }}
-
-
+ {{- $isHidden := .Params.cover.hidden | default site.Params.cover.hiddenInSingle | default site.Params.cover.hidden }}
+ {{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }}
+ {{- if (.Param "ShowToc") }}
+ {{- partial "toc.html" . }}
+ {{- end }}
+
+ {{- if .Content }}
+
+ {{- if not (.Param "disableAnchoredHeadings") }}
+ {{- partial "anchored_headings.html" .Content -}}
+ {{- else }}{{ .Content }}{{ end }}
{{- end }}
-
- {{- partial "anchored_headings.html" .Content -}}
-
+
- {{- if and ($.Site.Params.comments) (ne .Params.comments false) }}
+ {{- if (.Param "comments") }}
{{- partial "comments.html" . }}
{{- end }}
-{{- end }}{{/* end main */}}
+{{- end }}{{/* end main */}}
diff --git a/layouts/_default/single.html.orig b/layouts/_default/single.html.orig
new file mode 100644
index 0000000..b807f27
--- /dev/null
+++ b/layouts/_default/single.html.orig
@@ -0,0 +1,90 @@
+{{- define "main" }}
+
+
+
+ {{- $isHidden := .Params.cover.hidden | default site.Params.cover.hiddenInSingle | default site.Params.cover.hidden }}
+ {{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }}
+ {{- if (.Param "ShowToc") }}
+ {{- partial "toc.html" . }}
+ {{- end }}
+
+ {{- if .Content }}
+
+ {{- if not (.Param "disableAnchoredHeadings") }}
+ {{- partial "anchored_headings.html" .Content -}}
+ {{- else }}{{ .Content }}{{ end }}
+
+ {{- end }}
+
+
+
+ {{- if (.Param "comments") }}
+ {{- partial "comments.html" . }}
+ {{- end }}
+
+
+{{- end }}{{/* end main */}}
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
index 167efbc..cf51d39 100644
--- a/layouts/_default/terms.html
+++ b/layouts/_default/terms.html
@@ -1,8 +1,13 @@
-{{ define "main" }}
+{{- define "main" }}
{{- if .Title }}
{{- end }}
@@ -11,7 +16,7 @@
{{- range $key, $value := .Data.Terms.Alphabetical }}
{{- $name := .Name }}
{{- $count := .Count }}
- {{- with $.Site.GetPage (printf "/%s/%s" $type $name) }}
+ {{- with site.GetPage (printf "/%s/%s" $type $name) }}
{{ .Name }} {{ $count }}
@@ -19,4 +24,4 @@
{{- end }}
-{{ end }}{{/* end main */}}
\ No newline at end of file
+{{- end }}{{/* end main */ -}}
diff --git a/layouts/partials/anchored_headings.html b/layouts/partials/anchored_headings.html
index 27184fe..377af89 100644
--- a/layouts/partials/anchored_headings.html
+++ b/layouts/partials/anchored_headings.html
@@ -1,2 +1,2 @@
-
+{{- /* formats .Content headings by adding an anchor */ -}}
{{ . | replaceRE "(
)" "${1}# ${3}" | safeHTML }}
diff --git a/layouts/partials/author.html b/layouts/partials/author.html
index a1ef62c..8f2758f 100644
--- a/layouts/partials/author.html
+++ b/layouts/partials/author.html
@@ -1,7 +1,7 @@
-{{- if or .Params.author .Site.Params.author }}
-{{- $author := (.Params.author | default .Site.Params.author)}}
+{{- if or .Params.author site.Params.author }}
+{{- $author := (.Params.author | default site.Params.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 ", " ) }}
{{- else }}
{{- $author }}
diff --git a/layouts/partials/breadcrumbs.html b/layouts/partials/breadcrumbs.html
new file mode 100644
index 0000000..7e8257b
--- /dev/null
+++ b/layouts/partials/breadcrumbs.html
@@ -0,0 +1,19 @@
+{{- if (.Param "ShowBreadCrumbs") -}}
+
+ {{- $url := replace .Parent.Permalink (printf "%s" site.BaseURL) "" }}
+ {{- $lang_url := strings.TrimPrefix (printf "%s/" .Lang) $url -}}
+
+
{{ i18n "home" | default "Home" }}
+ {{- $scratch := newScratch }}
+ {{- range $index, $element := split $lang_url "/" }}
+
+ {{- $scratch.Add "path" (printf "%s/" $element )}}
+ {{- $bc_pg := site.GetPage ($scratch.Get "path") -}}
+
+ {{- if (and ($bc_pg) (gt (len . ) 0))}}
+ {{- print " » " | safeHTML -}}
{{ $bc_pg.Name }}
+ {{- end }}
+
+ {{- end -}}
+
+{{- end -}}
diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html
index d6ff010..918451a 100644
--- a/layouts/partials/comments.html
+++ b/layouts/partials/comments.html
@@ -1,5 +1,3 @@
-
-
-
\ No newline at end of file
+{{- /* Comments area start */ -}}
+{{- /* to add comments read => https://gohugo.io/content-management/comments/ */ -}}
+{{- /* Comments area end */ -}}
diff --git a/layouts/partials/cover.html b/layouts/partials/cover.html
index 4c87971..08311dc 100644
--- a/layouts/partials/cover.html
+++ b/layouts/partials/cover.html
@@ -1,29 +1,39 @@
{{- with .cxt}} {{/* Apply proper context from dict */}}
-{{- if .Params.cover.image }}
+{{- if (and .Params.cover.image (not $.isHidden)) }}
{{- $alt := (.Params.cover.alt | default .Params.cover.caption | plainify) }}
- {{- $addLink := (and .Site.Params.cover.linkFullImages (not $.IsHome)) }}
- {{- $cover := (.Page.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }}
+ {{- $responsiveImages := (.Params.cover.responsiveImages | default site.Params.cover.responsiveImages) | default true }}
+ {{- $addLink := (and site.Params.cover.linkFullImages (not $.IsHome)) }}
+ {{- $cover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }}
{{- if $cover -}}{{/* i.e it is present in page bundle */}}
{{- if $addLink }}{{ end -}}
{{- $sizes := (slice "360" "480" "720" "1080" "1500") }}
- {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") }}
- {{- $prod := (eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production")) }}
- {{- if (and (in $processableFormats $cover.MediaType.SubType) (ne .Site.Params.cover.responsiveImages false) (eq $prod true)) }}
-
+=======
+ {{- end -}}{{$cover.Permalink }} {{printf "%dw" ($cover.Width)}}"
+ sizes="(min-width: 768px) 720px, 100vw" src="{{ $cover.Permalink }}" alt="{{ $alt }}"
+ width="{{ $cover.Width }}" height="{{ $cover.Height }}">
+>>>>>>> d3d90be8a4ea04433d95d02a1dc07b0014c5b8b8
{{- else }}{{/* Unprocessable image or responsive images disabled */}}
-
+
{{- end }}
{{- else }}{{/* For absolute urls and external links, no img processing here */}}
{{- if $addLink }} {{ end -}}
-
+
{{- end }}
{{- if $addLink }} {{ end -}}
{{/* Display Caption */}}
@@ -32,4 +42,4 @@
{{- end }}
{{- end }}{{/* End image */}}
-{{- end -}}{{/* End context */}}
+{{- end -}}{{/* End context */ -}}
diff --git a/layouts/partials/cover.html.orig b/layouts/partials/cover.html.orig
new file mode 100644
index 0000000..08311dc
--- /dev/null
+++ b/layouts/partials/cover.html.orig
@@ -0,0 +1,45 @@
+{{- with .cxt}} {{/* Apply proper context from dict */}}
+{{- if (and .Params.cover.image (not $.isHidden)) }}
+{{- $alt := (.Params.cover.alt | default .Params.cover.caption | plainify) }}
+
+ {{- $responsiveImages := (.Params.cover.responsiveImages | default site.Params.cover.responsiveImages) | default true }}
+ {{- $addLink := (and site.Params.cover.linkFullImages (not $.IsHome)) }}
+ {{- $cover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }}
+ {{- if $cover -}}{{/* i.e it is present in page bundle */}}
+ {{- if $addLink }}{{ end -}}
+ {{- $sizes := (slice "360" "480" "720" "1080" "1500") }}
+ {{- $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 $cover.MediaType.SubType) ($responsiveImages) (eq $prod true)) }}
+
+=======
+ {{- end -}}{{$cover.Permalink }} {{printf "%dw" ($cover.Width)}}"
+ sizes="(min-width: 768px) 720px, 100vw" src="{{ $cover.Permalink }}" alt="{{ $alt }}"
+ width="{{ $cover.Width }}" height="{{ $cover.Height }}">
+>>>>>>> d3d90be8a4ea04433d95d02a1dc07b0014c5b8b8
+ {{- else }}{{/* Unprocessable image or responsive images disabled */}}
+
+ {{- end }}
+ {{- else }}{{/* For absolute urls and external links, no img processing here */}}
+ {{- if $addLink }} {{ end -}}
+
+ {{- end }}
+ {{- if $addLink }} {{ end -}}
+ {{/* Display Caption */}}
+ {{- if not $.IsHome }}
+ {{ with .Params.cover.caption }}{{ . | markdownify }}
{{- end }}
+ {{- end }}
+
+{{- end }}{{/* End image */}}
+{{- end -}}{{/* End context */ -}}
diff --git a/layouts/partials/edit_post.html b/layouts/partials/edit_post.html
new file mode 100644
index 0000000..efa4c70
--- /dev/null
+++ b/layouts/partials/edit_post.html
@@ -0,0 +1,8 @@
+{{- if or .Params.editPost.URL site.Params.editPost.URL -}}
+{{- $fileUrlPath := path.Join .File.Path }}
+
+{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated }} | {{- end -}}
+
+ {{- .Params.editPost.Text | default (site.Params.editPost.Text | default (i18n "edit_post" | default "Edit")) -}}
+
+{{- end }}
diff --git a/layouts/partials/extend_footer.html b/layouts/partials/extend_footer.html
index 52714e8..0519748 100644
--- a/layouts/partials/extend_footer.html
+++ b/layouts/partials/extend_footer.html
@@ -1,5 +1,3 @@
-
-
-
+{{- /* Footer custom content area start */ -}}
+{{- /* Insert any custom code web-analytics, resources, etc. here */ -}}
+{{- /* Footer custom content area end */ -}}
diff --git a/layouts/partials/extend_head.html b/layouts/partials/extend_head.html
index d372acc..150cbef 100644
--- a/layouts/partials/extend_head.html
+++ b/layouts/partials/extend_head.html
@@ -1,5 +1,4 @@
-
-
-
\ No newline at end of file
+{{- /* Head custom content area start */ -}}
+{{- /* Insert any custom code (web-analytics, resources, etc.) - it will appear in the section of every page. */ -}}
+{{- /* Can be overwritten by partial with the same name in the global layouts. */ -}}
+{{- /* Head custom content area end */ -}}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 832d7ca..552b0eb 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,41 +1,68 @@
+{{- if not (.Param "hideFooter") }}
-
-
-
-
-
+{{- end }}
+
+{{- if (not site.Params.disableScrollToTop) }}
+
+
+
+
+<<<<<<< HEAD
{{- partial "extend_footer.html" . -}}
{{ if in site.Params.mainSections .Type }}
{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint }}
+=======
+>>>>>>> d3d90be8a4ea04433d95d02a1dc07b0014c5b8b8
{{- end }}
+
+{{- partial "extend_footer.html" . }}
+
+
+{{- if (not site.Params.disableScrollToTop) }}
+
-{{- if (not .Site.Params.disableThemeToggle) }}
+{{- end }}
+
+{{- if (not site.Params.disableThemeToggle) }}
{{- end }}
+
+{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (.Param "ShowCodeCopyButtons")) }}
+
+{{- end }}
diff --git a/layouts/partials/footer.html.orig b/layouts/partials/footer.html.orig
new file mode 100644
index 0000000..552b0eb
--- /dev/null
+++ b/layouts/partials/footer.html.orig
@@ -0,0 +1,143 @@
+{{- if not (.Param "hideFooter") }}
+
+{{- end }}
+
+{{- if (not site.Params.disableScrollToTop) }}
+
+
+
+
+
+<<<<<<< HEAD
+{{- partial "extend_footer.html" . -}}
+{{ if in site.Params.mainSections .Type }}
+{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint }}
+
+=======
+>>>>>>> d3d90be8a4ea04433d95d02a1dc07b0014c5b8b8
+{{- end }}
+
+{{- partial "extend_footer.html" . }}
+
+
+
+{{- if (not site.Params.disableScrollToTop) }}
+
+{{- end }}
+
+{{- if (not site.Params.disableThemeToggle) }}
+
+{{- end }}
+
+{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (.Param "ShowCodeCopyButtons")) }}
+
+{{- end }}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 5943ac2..bb5a1e4 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -1,21 +1,28 @@
-{{- if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
+{{- if hugo.IsProduction | or (eq site.Params.env "production") | and (ne .Params.robotsNoIndex true) }}
{{- else }}
-
-{{- end -}}
-
-{{ if .IsHome }}{{else}}{{ if .Title }}{{ .Title }} | {{ end }}{{end}}{{ .Site.Title }}
-
+
+{{- end }}
+
+{{- /* Title */}}
+{{ if .IsHome }}{{ else }}{{ if .Title }}{{ .Title }} | {{ end }}{{ end }}{{ site.Title }}
+
+{{- /* Meta */}}
+{{- if .IsHome }}
+{{ with site.Params.keywords -}} {{ end }}
+{{- else }}
-
+ {{- range $i, $e := .Params.tags }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{- end -}}">
+{{- end }}
+
+<<<<<<< HEAD
{{- if .Site.Params.analytics.google.SiteVerificationTag }}
@@ -44,12 +51,151 @@
{{- range .Translations -}}
{{ end }}
+=======
+
+{{- if site.Params.analytics.google.SiteVerificationTag }}
+
+{{- end }}
+{{- if site.Params.analytics.yandex.SiteVerificationTag }}
+
+{{- end }}
+{{- if site.Params.analytics.bing.SiteVerificationTag }}
+
+{{- end }}
+{{- if site.Params.analytics.naver.SiteVerificationTag }}
+
+{{- end }}
+
+{{- /* Styles */}}
+
+{{- /* includes */}}
+{{- $includes := slice }}
+{{- $includes = $includes | append (" " | resources.FromString "assets/css/includes-blank.css")}}
+
+{{- if not (eq site.Params.assets.disableScrollBarStyle true) }}
+ {{- $ScrollStyle := (resources.Get "css/includes/scroll-bar.css") }}
+ {{- $includes = (append $ScrollStyle $includes) }}
+{{- end }}
+
+{{- $includes_all := $includes | resources.Concat "assets/css/includes.css" }}
+
+{{- $theme_vars := (resources.Get "css/core/theme-vars.css") }}
+{{- $reset := (resources.Get "css/core/reset.css") }}
+{{- $media := (resources.Get "css/core/zmedia.css") }}
+{{- $license_css := (resources.Get "css/core/license.css") }}
+{{- $common := (resources.Match "css/common/*.css") | resources.Concat "assets/css/common.css" }}
+
+{{- /* include `an-old-hope` if hljs is on */}}
+{{- $isHLJSdisabled := (site.Params.assets.disableHLJS | default false) }}
+{{- $hljs := (cond ($isHLJSdisabled) (".chroma { background-color: unset !important;}" | resources.FromString "assets/css/hljs-blank.css") (resources.Get "css/hljs/an-old-hope.min.css")) }}
+
+{{- /* order is important */}}
+{{- $core := (slice $theme_vars $reset $common $hljs $includes_all $media) | resources.Concat "assets/css/core.css" | resources.Minify }}
+{{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "assets/css/extended.css" | resources.Minify }}
+
+{{- /* bundle all required css */}}
+{{- /* Add extended css after theme style */ -}}
+{{- $stylesheet := (slice $license_css $core $extended) | resources.Concat "assets/css/stylesheet.css" }}
+
+{{- if not site.Params.assets.disableFingerprinting }}
+{{- $stylesheet := $stylesheet | fingerprint }}
+
+{{- else }}
+
+{{- end }}
+
+{{- /* Search */}}
+{{- if (eq .Layout `search`) -}}
+
+{{- $fastsearch := resources.Get "js/fastsearch.js" | js.Build (dict "params" (dict "fuseOpts" site.Params.fuseOpts)) | resources.Minify }}
+{{- $fusejs := resources.Get "js/fuse.basic.min.js" }}
+{{- $license_js := resources.Get "js/license.js" }}
+{{- if not site.Params.assets.disableFingerprinting }}
+{{- $search := (slice $fusejs $license_js $fastsearch ) | resources.Concat "assets/js/search.js" | fingerprint }}
+
+{{- else }}
+{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" }}
+
+{{- end }}
+{{- end -}}
+
+{{- /* Highlight.js */}}
+{{- $isHLJSdisabled := (site.Params.assets.disableHLJS | default .Params.disableHLJS ) }}
+{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (not $isHLJSdisabled)) }}
+{{- if not site.Params.assets.disableFingerprinting }}
+{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | fingerprint }}
+
+{{- else }}
+{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" }}
+
+{{- end }}
+{{- end }}
+
+{{- /* Favicons */}}
+
+
+
+
+
+
+
+
+{{- /* RSS */}}
+{{ range .AlternativeOutputFormats -}}
+
+{{ end -}}
+{{- range .AllTranslations -}}
+
+{{ end -}}
+
+
+
+ {{- if (and (ne site.Params.defaultTheme "light") (ne site.Params.defaultTheme "dark")) }}
+
+ {{- end }}
+
+
+>>>>>>> d3d90be8a4ea04433d95d02a1dc07b0014c5b8b8
{{- partial "extend_head.html" . -}}
-
-{{- if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
-{{- template "_internal/google_analytics_async.html" . }}
-{{- template "_internal/google_news.html" . }}
+
+{{- /* Misc */}}
+{{- if hugo.IsProduction | or (eq site.Params.env "production") }}
+{{- template "_internal/google_analytics.html" . }}
{{- template "partials/templates/opengraph.html" . }}
{{- template "partials/templates/twitter_cards.html" . }}
{{- template "partials/templates/schema_json.html" . }}
-{{- end }}
+{{- end -}}
diff --git a/layouts/partials/head.html.orig b/layouts/partials/head.html.orig
new file mode 100644
index 0000000..bb5a1e4
--- /dev/null
+++ b/layouts/partials/head.html.orig
@@ -0,0 +1,201 @@
+
+
+
+{{- if hugo.IsProduction | or (eq site.Params.env "production") | and (ne .Params.robotsNoIndex true) }}
+
+{{- else }}
+
+{{- end }}
+
+{{- /* Title */}}
+{{ if .IsHome }}{{ else }}{{ if .Title }}{{ .Title }} | {{ end }}{{ end }}{{ site.Title }}
+
+{{- /* Meta */}}
+{{- if .IsHome }}
+{{ with site.Params.keywords -}} {{ end }}
+{{- else }}
+
+{{- end }}
+
+
+<<<<<<< HEAD
+
+{{- if .Site.Params.analytics.google.SiteVerificationTag }}
+
+{{- end}}
+
+{{- $stylesheet := (resources.Match "css/*.css") | resources.Concat "assets/css/stylesheet.css" | minify | fingerprint -}}
+
+
+
+
+
+
+
+
+
+
+{{- hugo.Generator }}
+
+{{- range .AlternativeOutputFormats -}}
+
+{{ end -}}
+{{- range .Translations -}}
+
+{{ end }}
+=======
+
+{{- if site.Params.analytics.google.SiteVerificationTag }}
+
+{{- end }}
+{{- if site.Params.analytics.yandex.SiteVerificationTag }}
+
+{{- end }}
+{{- if site.Params.analytics.bing.SiteVerificationTag }}
+
+{{- end }}
+{{- if site.Params.analytics.naver.SiteVerificationTag }}
+
+{{- end }}
+
+{{- /* Styles */}}
+
+{{- /* includes */}}
+{{- $includes := slice }}
+{{- $includes = $includes | append (" " | resources.FromString "assets/css/includes-blank.css")}}
+
+{{- if not (eq site.Params.assets.disableScrollBarStyle true) }}
+ {{- $ScrollStyle := (resources.Get "css/includes/scroll-bar.css") }}
+ {{- $includes = (append $ScrollStyle $includes) }}
+{{- end }}
+
+{{- $includes_all := $includes | resources.Concat "assets/css/includes.css" }}
+
+{{- $theme_vars := (resources.Get "css/core/theme-vars.css") }}
+{{- $reset := (resources.Get "css/core/reset.css") }}
+{{- $media := (resources.Get "css/core/zmedia.css") }}
+{{- $license_css := (resources.Get "css/core/license.css") }}
+{{- $common := (resources.Match "css/common/*.css") | resources.Concat "assets/css/common.css" }}
+
+{{- /* include `an-old-hope` if hljs is on */}}
+{{- $isHLJSdisabled := (site.Params.assets.disableHLJS | default false) }}
+{{- $hljs := (cond ($isHLJSdisabled) (".chroma { background-color: unset !important;}" | resources.FromString "assets/css/hljs-blank.css") (resources.Get "css/hljs/an-old-hope.min.css")) }}
+
+{{- /* order is important */}}
+{{- $core := (slice $theme_vars $reset $common $hljs $includes_all $media) | resources.Concat "assets/css/core.css" | resources.Minify }}
+{{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "assets/css/extended.css" | resources.Minify }}
+
+{{- /* bundle all required css */}}
+{{- /* Add extended css after theme style */ -}}
+{{- $stylesheet := (slice $license_css $core $extended) | resources.Concat "assets/css/stylesheet.css" }}
+
+{{- if not site.Params.assets.disableFingerprinting }}
+{{- $stylesheet := $stylesheet | fingerprint }}
+
+{{- else }}
+
+{{- end }}
+
+{{- /* Search */}}
+{{- if (eq .Layout `search`) -}}
+
+{{- $fastsearch := resources.Get "js/fastsearch.js" | js.Build (dict "params" (dict "fuseOpts" site.Params.fuseOpts)) | resources.Minify }}
+{{- $fusejs := resources.Get "js/fuse.basic.min.js" }}
+{{- $license_js := resources.Get "js/license.js" }}
+{{- if not site.Params.assets.disableFingerprinting }}
+{{- $search := (slice $fusejs $license_js $fastsearch ) | resources.Concat "assets/js/search.js" | fingerprint }}
+
+{{- else }}
+{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" }}
+
+{{- end }}
+{{- end -}}
+
+{{- /* Highlight.js */}}
+{{- $isHLJSdisabled := (site.Params.assets.disableHLJS | default .Params.disableHLJS ) }}
+{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (not $isHLJSdisabled)) }}
+{{- if not site.Params.assets.disableFingerprinting }}
+{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | fingerprint }}
+
+{{- else }}
+{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" }}
+
+{{- end }}
+{{- end }}
+
+{{- /* Favicons */}}
+
+
+
+
+
+
+
+
+{{- /* RSS */}}
+{{ range .AlternativeOutputFormats -}}
+
+{{ end -}}
+{{- range .AllTranslations -}}
+
+{{ end -}}
+
+
+
+ {{- if (and (ne site.Params.defaultTheme "light") (ne site.Params.defaultTheme "dark")) }}
+
+ {{- end }}
+
+
+>>>>>>> d3d90be8a4ea04433d95d02a1dc07b0014c5b8b8
+{{- partial "extend_head.html" . -}}
+
+{{- /* Misc */}}
+{{- if hugo.IsProduction | or (eq site.Params.env "production") }}
+{{- template "_internal/google_analytics.html" . }}
+{{- template "partials/templates/opengraph.html" . }}
+{{- template "partials/templates/twitter_cards.html" . }}
+{{- template "partials/templates/schema_json.html" . }}
+{{- end -}}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 0ed3cac..2f0c273 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -1,15 +1,15 @@
-{{- /* theme-toggle is enabled */}}
-{{- if (not .Site.Params.disableThemeToggle) }}
-{{- /* theme is light */}}
-{{- if (eq .Site.Params.defaultTheme "light") }}
+{{- /* theme-toggle is enabled */}}
+{{- if (not site.Params.disableThemeToggle) }}
+{{- /* theme is light */}}
+{{- if (eq site.Params.defaultTheme "light") }}
-{{- /* theme is dark */}}
-{{- else if (eq .Site.Params.defaultTheme "dark") }}
+{{- /* theme is dark */}}
+{{- else if (eq site.Params.defaultTheme "dark") }}
{{- else }}
-{{- /* theme is auto */}}
+{{- /* theme is auto */}}
{{- end }}
-{{- /* theme-toggle is disabled and theme is auto */}}
-{{- else if (and (ne .Site.Params.defaultTheme "light") (ne .Site.Params.defaultTheme "dark"))}}
+{{- /* theme-toggle is disabled and theme is auto */}}
+{{- else if (and (ne site.Params.defaultTheme "light") (ne site.Params.defaultTheme "dark"))}}
{{- end }}
-
-
-
diff --git a/layouts/partials/header.html.orig b/layouts/partials/header.html.orig
new file mode 100644
index 0000000..2f0c273
--- /dev/null
+++ b/layouts/partials/header.html.orig
@@ -0,0 +1,200 @@
+{{- /* theme-toggle is enabled */}}
+{{- if (not site.Params.disableThemeToggle) }}
+{{- /* theme is light */}}
+{{- if (eq site.Params.defaultTheme "light") }}
+
+{{- /* theme is dark */}}
+{{- else if (eq site.Params.defaultTheme "dark") }}
+
+{{- else }}
+{{- /* theme is auto */}}
+
+{{- end }}
+{{- /* theme-toggle is disabled and theme is auto */}}
+{{- else if (and (ne site.Params.defaultTheme "light") (ne site.Params.defaultTheme "dark"))}}
+
+{{- end }}
+
+
diff --git a/layouts/partials/home_info.html b/layouts/partials/home_info.html
index ef08615..efae956 100644
--- a/layouts/partials/home_info.html
+++ b/layouts/partials/home_info.html
@@ -1,13 +1,13 @@
-{{- with $.Site.Params.homeInfoParams }}
+{{- with site.Params.homeInfoParams }}
-
- {{- .Content | markdownify }}
-
+
+ {{ .Content | markdownify }}
+
-{{- end}}
+{{- end -}}
diff --git a/layouts/partials/index_profile.html b/layouts/partials/index_profile.html
index bee94fb..d9ddbda 100644
--- a/layouts/partials/index_profile.html
+++ b/layouts/partials/index_profile.html
@@ -1,19 +1,56 @@
- {{- with .Site.Params.profileMode }}
+ {{- with site.Params.profileMode }}
- {{- if .imageUrl}}
{{- end}}
-
{{- .title | default $.Site.Title | markdownify -}}
-
{{- .subtitle | markdownify -}}
- {{- partial "social_icons.html" $.Site.Params.socialIcons -}}
+ {{- if .imageUrl -}}
+ {{- $img := "" }}
+ {{- if not (urls.Parse .imageUrl).IsAbs }}
+ {{- $img = resources.Get .imageUrl }}
+ {{- end }}
+ {{- 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 }}
+
+ {{- else }}
+
+ {{- end }}
+ {{- end }}
+
{{ .title | default site.Title | markdownify }}
+
{{ .subtitle | markdownify }}
+ {{- partial "social_icons.html" site.Params.socialIcons -}}
{{- with .buttons }}
{{- end }}
diff --git a/layouts/partials/post_canonical.html b/layouts/partials/post_canonical.html
new file mode 100644
index 0000000..abfc1e3
--- /dev/null
+++ b/layouts/partials/post_canonical.html
@@ -0,0 +1,9 @@
+{{ if and (.Params.canonicalURL) (.Params.ShowCanonicalLink ) -}}
+{{ $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 -}}
+
+ {{- (site.Params.CanonicalLinkText | default .Params.CanonicalLinkText) | default "Originally published at" -}}
+ {{ $url.Host }}
+
+{{- end }}
diff --git a/layouts/partials/post_meta.html b/layouts/partials/post_meta.html
index e0dbef4..15b8b1b 100644
--- a/layouts/partials/post_meta.html
+++ b/layouts/partials/post_meta.html
@@ -1,17 +1,21 @@
-{{- $scratch := newScratch}}
+{{- $scratch := newScratch }}
{{- if not .Date.IsZero -}}
-{{- $scratch.Add "meta" (slice (.Date.Format (default "January 2, 2006" .Site.Params.DateFormat))) }}
-{{- end -}}
-
-{{- if $.Site.Params.ShowReadingTime -}}
-{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%s min" .ReadingTime))) }}
-{{- end -}}
-
-{{ with (partial "author.html" . ) }}
-{{ $scratch.Add "meta" (slice .)}}
-{{end}}
-
-{{- with ($scratch.Get "meta")}}
-{{- delimit . " · "}}
+{{- $scratch.Add "meta" (slice (printf "
%s " (.Date) (.Date | time.Format (default "January 2, 2006" site.Params.DateFormat)))) }}
{{- end }}
+
+{{- if (.Param "ShowReadingTime") -}}
+{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime))) }}
+{{- end }}
+
+{{- if (.Param "ShowWordCount") -}}
+{{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "%d words" .WordCount))) }}
+{{- end }}
+
+{{- with (partial "author.html" .) }}
+{{- $scratch.Add "meta" (slice .) }}
+{{- end }}
+
+{{- with ($scratch.Get "meta") }}
+{{- delimit . " · " -}}
+{{- end -}}
diff --git a/layouts/partials/post_nav_links.html b/layouts/partials/post_nav_links.html
new file mode 100644
index 0000000..b988641
--- /dev/null
+++ b/layouts/partials/post_nav_links.html
@@ -0,0 +1,19 @@
+{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
+{{- if and (gt (len $pages) 1) (in $pages . ) }}
+
+ {{- with $pages.Next . }}
+
+ « {{ i18n "prev_page" }}
+
+ {{- .Name -}}
+
+ {{- end }}
+ {{- with $pages.Prev . }}
+
+ {{ i18n "next_page" }} »
+
+ {{- .Name -}}
+
+ {{- end }}
+
+{{- end }}
diff --git a/layouts/partials/share_icons.html b/layouts/partials/share_icons.html
index 17740d7..73454ea 100644
--- a/layouts/partials/share_icons.html
+++ b/layouts/partials/share_icons.html
@@ -1,57 +1,85 @@
-{{- $pageurl := .RelPermalink }}
+{{- $pageurl := .Permalink }}
{{- $title := .Title }}
-{{ $.Scratch.Set "tags" ""}}
+{{- $.Scratch.Set "tags" ""}}
{{- with .Params.Tags }}
+<<<<<<< HEAD
{{ $hashtags := newScratch}}
{{ range . }}{{ $hashtags.Add "tags" (slice (replaceRE "(\\s)" "" . ))}}{{end}}
{{ $.Scratch.Set "tags" (delimit ($hashtags.Get "tags") ",") }}
{{- end }}
{{- if .Site.Params.ShareButtons }}
+=======
+{{- $hashtags := newScratch}}
+{{- range . }}{{ $hashtags.Add "tags" (slice (replaceRE "(\\s)" "" . ))}}{{end}}
+{{- $.Scratch.Set "tags" (delimit ($hashtags.Get "tags") ",") }}
+{{- end -}}
+
+{{- $custom := false }}
+{{- $ShareButtons := (.Param "ShareButtons")}}
+{{- with $ShareButtons }}{{ $custom = true }}{{ end }}
+
+>>>>>>> d3d90be8a4ea04433d95d02a1dc07b0014c5b8b8
{{- end -}}
+=======
+ {{- end }}
+
+>>>>>>> d3d90be8a4ea04433d95d02a1dc07b0014c5b8b8
diff --git a/layouts/partials/share_icons.html.orig b/layouts/partials/share_icons.html.orig
new file mode 100644
index 0000000..23d36c7
--- /dev/null
+++ b/layouts/partials/share_icons.html.orig
@@ -0,0 +1,85 @@
+{{- $pageurl := .RelPermalink }}
+{{- $title := .Title }}
+
+{{- $.Scratch.Set "tags" ""}}
+
+{{- with .Params.Tags }}
+<<<<<<< HEAD
+{{ $hashtags := newScratch}}
+{{ range . }}{{ $hashtags.Add "tags" (slice (replaceRE "(\\s)" "" . ))}}{{end}}
+{{ $.Scratch.Set "tags" (delimit ($hashtags.Get "tags") ",") }}
+{{- end }}
+{{- if .Site.Params.ShareButtons }}
+=======
+{{- $hashtags := newScratch}}
+{{- range . }}{{ $hashtags.Add "tags" (slice (replaceRE "(\\s)" "" . ))}}{{end}}
+{{- $.Scratch.Set "tags" (delimit ($hashtags.Get "tags") ",") }}
+{{- end -}}
+
+{{- $custom := false }}
+{{- $ShareButtons := (.Param "ShareButtons")}}
+{{- with $ShareButtons }}{{ $custom = true }}{{ end }}
+
+>>>>>>> d3d90be8a4ea04433d95d02a1dc07b0014c5b8b8
+
+{{- end -}}
+
+=======
+ {{- end }}
+
+>>>>>>> d3d90be8a4ea04433d95d02a1dc07b0014c5b8b8
diff --git a/layouts/partials/social_icons.html b/layouts/partials/social_icons.html
index 7bb9c14..3f8d6a3 100644
--- a/layouts/partials/social_icons.html
+++ b/layouts/partials/social_icons.html
@@ -1,6 +1,7 @@
diff --git a/layouts/partials/svg.html b/layouts/partials/svg.html
index 0d4d0c0..49f5389 100644
--- a/layouts/partials/svg.html
+++ b/layouts/partials/svg.html
@@ -1,11 +1,12 @@
-{{ $icon_name := ( trim .name " " | lower )}}
+{{- $icon_name := ( trim .name " " | lower )}}
{{- if (eq $icon_name "123rf") -}}
-
+
+
{{- else if (eq $icon_name "adobestock") -}}
@@ -13,6 +14,21 @@
+{{- else if (eq $icon_name "anilist") -}}
+
+
+
+{{- else if (eq $icon_name "applemusic") -}}
+
+
+
+{{- else if (eq $icon_name "applepodcasts") -}}
+
+
+
{{- else if (eq $icon_name "behance") -}}
@@ -20,6 +36,19 @@
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" />
+{{- else if (eq $icon_name "bilibili") -}}
+
+
+
+
+
+
+
+{{- else if (eq $icon_name "bitcoin") -}}
+
+
+
{{- else if (eq $icon_name "buymeacoffee") -}}
+{{- else if (eq $icon_name "ctftime") -}}
+
+
+
+
+
+
+{{- else if (eq $icon_name "cv") -}}
+
+
+
+
+
+
{{- else if (eq $icon_name "dev") -}}
+{{- else if (eq $icon_name "deviantart") -}}
+
+
+
+{{- else if (eq $icon_name "deezer") -}}
+
+
+
{{- else if (eq $icon_name "discogs") -}}
+ paint-order="stroke fill markers" />
+
{{- else if (eq $icon_name "dribbble") -}}
@@ -108,9 +170,10 @@
+ d="M8.533 3.208s2.888 2.73 5.339 9.235c2.451 6.505 2.344 8.4 2.344 8.4" />
+
{{- else if (eq $icon_name "email") -}}
-
@@ -120,6 +183,11 @@
stroke-linecap="round" stroke-linejoin="round">
+{{- else if (eq $icon_name "flickr") -}}
+
+
+
{{- else if (eq $icon_name "freepik") -}}
@@ -130,7 +198,13 @@
d="M1.265 12.607c.159-1.98.561-3.898 2.08-5.701m5.148-3.29c2.006-.66 3.968-1.157 6.446-.844m5.202 2.98c1.192 1.275 1.963 2.163 2.594 3.815"
style="font-variation-settings:normal" stroke="currentColor" stroke-linejoin="round" />
-
+
+
+{{- else if (eq $icon_name "gitea") -}}
+
+
+
{{- else if (eq $icon_name "github") -}}
@@ -145,6 +219,41 @@
d="M22.65 14.39L12 22.13 1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78 2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z">
+{{- else if (eq $icon_name "goodreads") -}}
+
+
+
+{{- else if (eq $icon_name "googlepodcasts") -}}
+
+
+
+{{- else if (eq $icon_name "googlescholar") -}}
+
+
+
+{{- else if (eq $icon_name "gurushots") -}}
+
+
+
+
+
+
+
+
+
+
+
+
+{{- else if (eq $icon_name "hackerone") -}}
+
+
+
{{- else if (eq $icon_name "hackerrank") -}}
@@ -159,10 +268,10 @@
{{- else if (eq $icon_name "hackthebox") -}}
+ preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" fill="currentColor" stroke="none">
+ d="M11.9959.0008a1.1187 1.1187 0 00-.057.002.8993.8993 0 00-.2358.0498.9067.9067 0 00-.1652.079L1.9357 5.675a.889.889 0 00-.4444.7699c0 .006.0004.0128.0006.0192-.0002.007 0 .014 0 .0212V17.556a.889.889 0 00.469.7837l9.5983 5.5416c.018.0102.036.0197.054.0287v.002a.8568.8568 0 00.083.0348c0 .001.01.003.012.004.028.01.056.0177.085.0245.01.001.011.003.016.004.028.006.057.0112.086.0146 0 .0005.01.0009.014.001.03.003.061.005.091.005s.061-.002.091-.005c0-.0005.01-.0009.014-.001a.6831.6831 0 00.086-.0146c.01-.001.011-.002.016-.004a.9404.9404 0 00.085-.0245c0-.001.01-.003.012-.004a.8818.8818 0 00.083-.0347v-.002a1.086 1.086 0 00.054-.0287l9.5986-5.5416a.889.889 0 00.4689-.7837V6.4786c0-.009-.0006-.0172-.0008-.0258h.0003v-.008a.8886.8886 0 00-.3117-.6755c-.01-.008-.019-.0162-.029-.0241 0-.002-.01-.005-.01-.007a.8988.8988 0 00-.1074-.0705L12.4533.1267a.8872.8872 0 00-.4646-.1266zm.01 2.2523c.072 0 .1443.0187.209.056l6.5366 3.774c.2789.161.2789.5633 0 .7243l-6.5367 3.774a.4182.4182 0 01-.4182 0L5.26 6.8074c-.2788-.1609-.2789-.5633 0-.7243l6.5368-3.774a.4193.4193 0 01.209-.056zm-8.0801 6.458a.4145.4145 0 01.215.0565l6.524 3.7666a.417.417 0 01.2086.3612v7.5326c0 .3212-.3477.522-.626.3613l-6.5237-3.7666a.4172.4172 0 01-.2086-.3613V9.1288c0-.2408.1955-.414.4107-.4177zm16.1599 0c.215.004.4107.1768.4107.4177v7.5325c0 .149-.08.2868-.2087.3614l-6.5239 3.7666c-.278.1606-.6258-.0401-.6258-.3614v-7.5325c0-.149.08-.2867.2086-.3613l6.5238-3.7666a.415.415 0 01.2152-.0565z">
@@ -173,16 +282,65 @@
+{{- else if (eq $icon_name "itchio") -}}
+
+
+
+{{- else if (eq $icon_name "kaggle") -}}
+
+
+
+{{- else if (eq $icon_name "kakaotalk") -}}
+
+
+
+
+
+
+
{{- else if (eq $icon_name "keybase") -}}
+{{- else if (eq $icon_name "kofi") -}}
+
+
+
+{{- else if (eq $icon_name "komoot") -}}
+
+
+
{{- else if (eq $icon_name "lastfm") -}}
+{{- else if (eq $icon_name "letterboxd") -}}
+
+
+
+{{- else if (eq $icon_name "liberapay") -}}
+
+
+
+
+
+
+{{- else if (eq $icon_name "lichess" ) -}}
+
+
+
{{- else if (eq $icon_name "linkedin") -}}
@@ -200,6 +358,11 @@
d="M17.832 8.633v5h-1.978V8.78c0-1.023-.43-1.542-1.29-1.542-.95 0-1.427.616-1.427 1.834v2.655H11.17V9.072c0-1.218-.476-1.834-1.427-1.834-.86 0-1.29.52-1.29 1.542v4.852H6.475V8.633c0-1.022.26-1.834.782-2.434.538-.6 1.243-.909 2.118-.909 1.012 0 1.779.39 2.286 1.169l.492.827.493-.827c.507-.78 1.274-1.169 2.286-1.169.875 0 1.58.308 2.118.909.522.6.782 1.412.782 2.434"
fill="currentColor" stroke="none" />
+{{- else if (eq $icon_name "matrix") -}}
+
+
+
{{- else if (eq $icon_name "medium") -}}
@@ -208,17 +371,98 @@
d="M0 380 l0 -380 380 0 380 0 0 380 0 380 -380 0 -380 0 0 -380z m334 85 c30 -63 57 -115 59 -115 2 0 16 30 31 68 15 37 37 88 49 115 l20 47 76 0 76 -1 -27 -20 -28 -21 0 -151 c0 -150 0 -151 27 -179 l27 -28 -109 0 -109 0 27 28 c26 27 27 32 26 143 0 131 3 134 -71 -58 -24 -62 -48 -113 -53 -113 -6 0 -17 16 -24 35 -7 19 -36 83 -64 142 l-52 108 -3 -98 c-3 -97 -2 -99 28 -133 16 -19 30 -39 30 -44 0 -6 -31 -10 -70 -10 -45 0 -70 4 -70 11 0 6 14 27 30 46 30 33 30 35 30 151 0 116 0 118 -31 155 l-30 37 75 0 76 0 54 -115z" />
+{{- else if (eq $icon_name "microblog") -}}
+
+
+
+
+
+
{{- else if (eq $icon_name "mixcloud") -}}
+{{- else if (eq $icon_name "monero") -}}
+
+
+
+{{- else if (eq $icon_name "nuget") -}}
+
+
+
+
+
+
+
+
+{{- else if (eq $icon_name "orcid") -}}
+
+
+
+{{- else if (eq $icon_name "osu!") -}}
+
+
+
+
+
+
+{{- else if (eq $icon_name "overcast") -}}
+
+
+
+{{- else if (eq $icon_name "patreon") -}}
+
+
+
{{- else if (eq $icon_name "paypal") -}}
+ style="font-variation-settings:normal" stroke="currentColor" stroke-linejoin="miter" />
+
+{{- else if (eq $icon_name "peertube") -}}
+
+
+
+{{- else if or (eq $icon_name "pgpkey") (eq $icon_name "key") -}}
+
+
+
+
+{{- else if (eq $icon_name "phone") -}}
+
+
+
+
+
+{{- else if (eq $icon_name "pocketcasts") -}}
+
+
+
+{{- else if (eq $icon_name "polywork") -}}
+
+
+
{{- else if (eq $icon_name "qq") -}}
@@ -226,6 +470,17 @@
d="M433.754 420.445c-11.526 1.393-44.86-52.741-44.86-52.741 0 31.345-16.136 72.247-51.051 101.786 16.842 5.192 54.843 19.167 45.803 34.421-7.316 12.343-125.51 7.881-159.632 4.037-34.122 3.844-152.316 8.306-159.632-4.037-9.045-15.25 28.918-29.214 45.783-34.415-34.92-29.539-51.059-70.445-51.059-101.792 0 0-33.334 54.134-44.859 52.741-5.37-.65-12.424-29.644 9.347-99.704 10.261-33.024 21.995-60.478 40.144-105.779C60.683 98.063 108.982.006 224 0c113.737.006 163.156 96.133 160.264 214.963 18.118 45.223 29.912 72.85 40.144 105.778 21.768 70.06 14.716 99.053 9.346 99.704z">
+{{- else if (eq $icon_name "reddit") -}}
+
+
+
+{{- else if (eq $icon_name "researchgate") -}}
+
+
+
{{- else if (eq $icon_name "rss") -}}
@@ -233,6 +488,17 @@
+{{- else if (eq $icon_name "serverfault") -}}
+
+
+
+{{- else if (eq $icon_name "sessionmessenger") -}}
+
+
+
+
{{- else if (eq $icon_name "soundcloud") -}}
+ stroke-linecap="square" stroke-linejoin="miter" />
+
+{{- else if (eq $icon_name "sketchfab") -}}
+
+
+
{{- else if (eq $icon_name "slack") -}}
@@ -253,27 +524,21 @@
-{{- else if (eq $icon_name "sourcerer") -}}
-
-
-
-
-
-
-
-
-
-
-
+{{- else if (eq $icon_name "snapchat") -}}
+
+
+
+{{- else if (eq $icon_name "sourcehut") -}}
+
+
+
+
+{{- else if (eq $icon_name "spotify") -}}
+
+
{{- else if (eq $icon_name "stackoverflow") -}}
+ d="M-24.6 20.8c-1.4-.8-2.7-1.5-4.1-2.3-2.4-1.5-3.6-3.6-3.3-6.5.3-3 2.8-5.2 5.8-5.3h11c2.6 0 4.6 2.2 4.7 4.7 0 2.6-2 4.8-4.6 4.9h-2.8v.2c.2.2.5.3.7.5 1.2.7 2.4 1.3 3.6 2 2.5 1.5 3.7 4.5 2.9 7.2-.8 2.7-3.1 4.3-6.1 4.4h-10.6c-2.4 0-4.3-1.9-4.6-4.3-.3-2.3 1.2-4.5 3.5-5.1.6-.1 1.2-.1 1.7-.2h2.1c.1 0 .1-.1.1-.2zm4.3-3.8c-.1.3-.2.3-.2.4v3.9c0 1.1-.1 1.2-1.2 1.2h-5.1c-.4 0-.9 0-1.3.1-1.6.4-2.5 1.9-2.4 3.6.2 1.6 1.6 2.9 3.3 2.9h10.5c2.1 0 3.8-1.2 4.5-3.1.7-1.8.2-4.1-1.5-5.3-2.1-1.3-4.3-2.4-6.6-3.7zm-1.7 3.4v-4c0-1.4.1-1.5 1.4-1.5h5.3c1.5 0 2.7-1 3.1-2.4.6-2.2-1-4.2-3.4-4.3h-10.1c-2.4 0-4.3 1.3-4.9 3.4-.6 2.1.4 4.4 2.5 5.5 1.7 1 3.5 1.9 5.2 2.9.4.2.6.3.9.4z" />
+
+
+
+
+
+
+
+{{- else if (eq $icon_name "strava") -}}
+
+
{{- else if (eq $icon_name "telegram") -}}
+{{- else if (eq $icon_name "threema") -}}
+
+
+
+{{- else if (eq $icon_name "tiktok") -}}
+
+
+
{{- else if (eq $icon_name "twitch") -}}
@@ -304,6 +597,41 @@
d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z">
+{{- else if (eq $icon_name "unsplash") -}}
+
+
+
+
+{{- else if (eq $icon_name "vimeo") -}}
+
+
+
+{{- else if (eq $icon_name "xda") -}}
+
+
+
+{{- else if (eq $icon_name "xing") -}}
+
+
+
+
+{{- else if (eq $icon_name "xmpp") -}}
+
+
+
+
+{{- else if (eq $icon_name "ycombinator") -}}
+
+
+
{{- else if (eq $icon_name "youtube") -}}
diff --git a/layouts/partials/templates/opengraph.html b/layouts/partials/templates/opengraph.html
index 9945937..16afeec 100644
--- a/layouts/partials/templates/opengraph.html
+++ b/layouts/partials/templates/opengraph.html
@@ -1,5 +1,5 @@
-
+
{{- if .Params.cover.image -}}
@@ -9,57 +9,59 @@
{{- end}}
{{- else }}
-{{ with $.Params.images }}{{ range first 6 . -}}
-
-{{ end }}{{ else -}}
+
+{{- with $.Params.images -}}
+{{- range first 6 . }} {{ end -}}
+{{- else -}}
{{- $images := $.Resources.ByType "image" -}}
{{- $featured := $images.GetMatch "*feature*" -}}
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
{{- with $featured -}}
+<<<<<<< HEAD
{{ else -}}
{{- with $.Site.Params.images -}}
{{ end }}{{ end }}{{ end }}
+=======
+
+{{- else -}}
+{{- with site.Params.images }} {{ end -}}
+{{- end -}}
+{{- end -}}
+>>>>>>> d3d90be8a4ea04433d95d02a1dc07b0014c5b8b8
{{- end }}
-{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
{{- if .IsPage }}
-{{- if not .PublishDate.IsZero }}
-{{ else if not .Date.IsZero }}
-{{ end }}
-{{- if not .Lastmod.IsZero }} {{ end }}
-{{- else }}
-{{- if not .Date.IsZero }}
-{{- end }}
-{{- end }}{{/* .IsPage */}}
+{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
+
+{{ with .PublishDate }} {{ end }}
+{{ with .Lastmod }} {{ end }}
+{{- end -}}
{{- with .Params.audio }} {{ end }}
{{- with .Params.locale }} {{ end }}
-{{- with .Site.Params.title }} {{ end }}
-{{- with .Params.videos }}
-{{- range . }}
+{{- with site.Params.title }} {{ end }}
+{{- with .Params.videos }}{{- range . }}
{{ end }}{{ end }}
{{- /* If it is part of a series, link to related articles */}}
+<<<<<<< HEAD
{{- $permalink := .RelPermalink }}
{{- $siteSeries := .Site.Taxonomies.series }}{{ with .Params.series }}
{{- range $name := . }}
{{- $series := index $siteSeries $name }}
+=======
+{{- $permalink := .Permalink }}
+{{- $siteSeries := site.Taxonomies.series }}
+{{ with .Params.series }}{{- range $name := . }}
+ {{- $series := index $siteSeries ($name | urlize) }}
+>>>>>>> d3d90be8a4ea04433d95d02a1dc07b0014c5b8b8
{{- range $page := first 6 $series.Pages }}
{{- if ne $page.RelPermalink $permalink }} {{ end }}
{{- end }}
{{ end }}{{ end }}
-{{- if .IsPage }}
-{{- range .Site.Authors }}{{ with .Social.facebook }}
- {{ end }}{{ with .Site.Social.facebook }}
- {{ end }}
-
-{{- with .Params.tags }}{{ range first 6 . }}
- {{ end }}{{ end }}
-{{- end }}{{ end }}
-
{{- /* Facebook Page Admin ID for Domain Insights */}}
-{{- with .Site.Social.facebook_admin }} {{ end }}
+{{- with site.Social.facebook_admin }} {{ end }}
diff --git a/layouts/partials/templates/opengraph.html.orig b/layouts/partials/templates/opengraph.html.orig
new file mode 100644
index 0000000..16afeec
--- /dev/null
+++ b/layouts/partials/templates/opengraph.html.orig
@@ -0,0 +1,67 @@
+
+
+
+
+{{- if .Params.cover.image -}}
+{{- if (ne .Params.cover.relative true) }}
+
+{{- else}}
+
+{{- end}}
+{{- else }}
+
+{{- with $.Params.images -}}
+{{- range first 6 . }} {{ end -}}
+{{- else -}}
+{{- $images := $.Resources.ByType "image" -}}
+{{- $featured := $images.GetMatch "*feature*" -}}
+{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
+{{- with $featured -}}
+<<<<<<< HEAD
+
+{{ else -}}
+{{- with $.Site.Params.images -}}
+
+{{ end }}{{ end }}{{ end }}
+=======
+
+{{- else -}}
+{{- with site.Params.images }} {{ end -}}
+{{- end -}}
+{{- end -}}
+>>>>>>> d3d90be8a4ea04433d95d02a1dc07b0014c5b8b8
+{{- end }}
+
+{{- if .IsPage }}
+{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
+
+{{ with .PublishDate }} {{ end }}
+{{ with .Lastmod }} {{ end }}
+{{- end -}}
+
+{{- with .Params.audio }} {{ end }}
+{{- with .Params.locale }} {{ end }}
+{{- with site.Params.title }} {{ end }}
+{{- with .Params.videos }}{{- range . }}
+
+{{ end }}{{ end }}
+
+{{- /* If it is part of a series, link to related articles */}}
+<<<<<<< HEAD
+{{- $permalink := .RelPermalink }}
+{{- $siteSeries := .Site.Taxonomies.series }}{{ with .Params.series }}
+{{- range $name := . }}
+ {{- $series := index $siteSeries $name }}
+=======
+{{- $permalink := .Permalink }}
+{{- $siteSeries := site.Taxonomies.series }}
+{{ with .Params.series }}{{- range $name := . }}
+ {{- $series := index $siteSeries ($name | urlize) }}
+>>>>>>> d3d90be8a4ea04433d95d02a1dc07b0014c5b8b8
+ {{- range $page := first 6 $series.Pages }}
+ {{- if ne $page.RelPermalink $permalink }} {{ end }}
+ {{- end }}
+{{ end }}{{ end }}
+
+{{- /* Facebook Page Admin ID for Domain Insights */}}
+{{- with site.Social.facebook_admin }} {{ end }}
diff --git a/layouts/partials/templates/schema_json.html b/layouts/partials/templates/schema_json.html
index 891e954..4f66cee 100644
--- a/layouts/partials/templates/schema_json.html
+++ b/layouts/partials/templates/schema_json.html
@@ -2,28 +2,67 @@
-{{- else if .IsPage }}
+{{- else if (or .IsPage .IsSection) }}
+{{/* BreadcrumbList */}}
+{{- $url := replace .Parent.Permalink ( printf "%s" site.BaseURL) "" }}
+{{- $lang_url := strings.TrimPrefix ( printf "%s/" .Lang) $url }}
+{{- $bc_list := (split $lang_url "/")}}
+
+{{- $scratch := newScratch }}
+
+{{- if .IsPage }}
-{{ end }}
+{{- end }}{{/* .IsPage end */}}
+
+{{- end -}}
diff --git a/layouts/partials/templates/twitter_cards.html b/layouts/partials/templates/twitter_cards.html
index 816fafb..7cf34d7 100644
--- a/layouts/partials/templates/twitter_cards.html
+++ b/layouts/partials/templates/twitter_cards.html
@@ -17,7 +17,7 @@
{{- else -}}
-{{- with $.Site.Params.images -}}
+{{- with site.Params.images -}}
{{ else -}}
@@ -27,12 +27,7 @@
{{- end }}
{{- end }}
-
-{{ with .Site.Social.twitter -}}
+
+{{ with site.Social.twitter -}}
{{ end -}}
-{{ range .Site.Authors }}
-{{ with .twitter -}}
-
-{{ end -}}
-{{ end -}}
\ No newline at end of file
diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html
index c873bdb..d9b8b23 100644
--- a/layouts/partials/toc.html
+++ b/layouts/partials/toc.html
@@ -1,84 +1,97 @@
{{- $headers := findRE "(.|\n])+? " .Content -}}
{{- $has_headers := ge (len $headers) 1 -}}
{{- if $has_headers -}}
+
+
+
+ {{- i18n "toc" | default "Table of Contents" }}
+
-{{- $largest := 6 -}}
-{{- range $headers -}}
-{{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}}
-{{- $headerLevel := len (seq $headerLevel) -}}
-{{- if lt $headerLevel $largest -}}
-{{- $largest = $headerLevel -}}
-{{- end -}}
-{{- end -}}
-
-{{- $firstHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers 0) 1) 0)) -}}
-
-{{- $.Scratch.Set "bareul" slice -}}
-
- {{- range seq (sub $firstHeaderLevel $largest) -}}
-
- {{- $.Scratch.Add "bareul" (sub (add $largest .) 1) -}}
- {{- end -}}
- {{- range $i, $header := $headers -}}
- {{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}}
- {{- $headerLevel := len (seq $headerLevel) -}}
-
- {{/* get id="xyz" */}}
- {{- $id := index (findRE "(id=\"(.*?)\")" $header 9) 0 }}
-
- {{- /* strip id="" to leave xyz, no way to get regex capturing groups in hugo */ -}}
- {{- $cleanedID := replace (replace $id "id=\"" "") "\"" "" }}
- {{- $header := replaceRE "((.|\n])+?) " "$1" $header -}}
-
- {{- if ne $i 0 -}}
- {{- $prevHeaderLevel := index (findRE "[1-6]" (index $headers (sub $i 1)) 1) 0 -}}
- {{- $prevHeaderLevel := len (seq $prevHeaderLevel) -}}
- {{- if gt $headerLevel $prevHeaderLevel -}}
- {{- range seq $prevHeaderLevel (sub $headerLevel 1) -}}
-
- {{/* the first should not be recorded */}}
- {{- if ne $prevHeaderLevel . -}}
- {{- $.Scratch.Add "bareul" . -}}
+
+ {{- if (.Param "UseHugoToc") }}
+ {{- .TableOfContents -}}
+ {{- else }}
+ {{- $largest := 6 -}}
+ {{- range $headers -}}
+ {{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}}
+ {{- $headerLevel := len (seq $headerLevel) -}}
+ {{- if lt $headerLevel $largest -}}
+ {{- $largest = $headerLevel -}}
{{- end -}}
{{- end -}}
- {{- else -}}
+
+ {{- $firstHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers 0) 1) 0)) -}}
+
+ {{- $.Scratch.Set "bareul" slice -}}
+
+ {{- range seq (sub $firstHeaderLevel $largest) -}}
+
+ {{- $.Scratch.Add "bareul" (sub (add $largest .) 1) -}}
+ {{- end -}}
+ {{- range $i, $header := $headers -}}
+ {{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}}
+ {{- $headerLevel := len (seq $headerLevel) -}}
+
+ {{/* get id="xyz" */}}
+ {{- $id := index (findRE "(id=\"(.*?)\")" $header 9) 0 }}
+
+ {{- /* strip id="" to leave xyz, no way to get regex capturing groups in hugo */ -}}
+ {{- $cleanedID := replace (replace $id "id=\"" "") "\"" "" }}
+ {{- $header := replaceRE "((.|\n])+?) " "$1" $header -}}
+
+ {{- if ne $i 0 -}}
+ {{- $prevHeaderLevel := index (findRE "[1-6]" (index $headers (sub $i 1)) 1) 0 -}}
+ {{- $prevHeaderLevel := len (seq $prevHeaderLevel) -}}
+ {{- if gt $headerLevel $prevHeaderLevel -}}
+ {{- range seq $prevHeaderLevel (sub $headerLevel 1) -}}
+
+ {{/* the first should not be recorded */}}
+ {{- if ne $prevHeaderLevel . -}}
+ {{- $.Scratch.Add "bareul" . -}}
+ {{- end -}}
+ {{- end -}}
+ {{- else -}}
+
+ {{- if lt $headerLevel $prevHeaderLevel -}}
+ {{- range seq (sub $prevHeaderLevel 1) -1 $headerLevel -}}
+ {{- if in ($.Scratch.Get "bareul") . -}}
+
+ {{/* manually do pop item */}}
+ {{- $tmp := $.Scratch.Get "bareul" -}}
+ {{- $.Scratch.Delete "bareul" -}}
+ {{- $.Scratch.Set "bareul" slice}}
+ {{- range seq (sub (len $tmp) 1) -}}
+ {{- $.Scratch.Add "bareul" (index $tmp (sub . 1)) -}}
+ {{- end -}}
+ {{- else -}}
+
+
+ {{- end -}}
+ {{- end -}}
+ {{- end -}}
+ {{- end }}
+
+ {{- $header | safeHTML -}}
+ {{- else }}
+
+ {{- $header | safeHTML -}}
+ {{- end -}}
+ {{- end -}}
+
+ {{- $firstHeaderLevel := $largest }}
+ {{- $lastHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers (sub (len $headers) 1)) 1) 0)) }}
+
+ {{- range seq (sub $lastHeaderLevel $firstHeaderLevel) -}}
+ {{- if in ($.Scratch.Get "bareul") (add . $firstHeaderLevel) }}
+
+ {{- else }}
+
- {{- if lt $headerLevel $prevHeaderLevel -}}
- {{- range seq (sub $prevHeaderLevel 1) -1 $headerLevel -}}
- {{- if in ($.Scratch.Get "bareul") . -}}
-
- {{/* manually do pop item */}}
- {{- $tmp := $.Scratch.Get "bareul" -}}
- {{- $.Scratch.Delete "bareul" -}}
- {{- $.Scratch.Set "bareul" slice}}
- {{- range seq (sub (len $tmp) 1) -}}
- {{- $.Scratch.Add "bareul" (index $tmp (sub . 1)) -}}
- {{- end -}}
- {{- else -}}
-
-
- {{- end -}}
- {{- end -}}
- {{- end -}}
- {{- end -}}
-
- {{- $header | safeHTML -}}
- {{- else -}}
-
- {{- $header | safeHTML -}}
- {{- end -}}
- {{- end -}}
-
- {{- $firstHeaderLevel := $largest }}
- {{- $lastHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers (sub (len $headers) 1)) 1) 0)) -}}
-
- {{- range seq (sub $lastHeaderLevel $firstHeaderLevel) -}}
- {{- if in ($.Scratch.Get "bareul") (add . $firstHeaderLevel) -}}
-
-{{- else -}}
-
-
-{{- end -}}
-{{- end -}}
-
-{{- end -}}
+ {{- end -}}
+ {{- end }}
+
+ {{- end }}
+
+
+
+{{- end }}
diff --git a/layouts/partials/translation_list.html b/layouts/partials/translation_list.html
new file mode 100644
index 0000000..0028251
--- /dev/null
+++ b/layouts/partials/translation_list.html
@@ -0,0 +1,19 @@
+{{- if .IsTranslated -}}
+{{- if (ne .Layout "search") }}
+{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) }} | {{- end -}}
+{{- end }}
+{{- i18n "translations" | default "Translations" }}:
+
+{{- end -}}
diff --git a/layouts/robots.txt b/layouts/robots.txt
index 35f59d1..f26f508 100644
--- a/layouts/robots.txt
+++ b/layouts/robots.txt
@@ -1,5 +1,5 @@
User-agent: *
-{{- if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
+{{- if hugo.IsProduction | or (eq site.Params.env "production") }}
Disallow:
{{- else }}
Disallow: /
diff --git a/layouts/shortcodes/blockquote.html b/layouts/shortcodes/blockquote.html
deleted file mode 100644
index 14bb107..0000000
--- a/layouts/shortcodes/blockquote.html
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-
-
-
-{{ $.Scratch.Set "bl_author" false }}
-{{ $.Scratch.Set "bl_source" false }}
-{{ $.Scratch.Set "bl_link" false }}
-{{ $.Scratch.Set "bl_title" false }}
-
-{{ if .IsNamedParams }}
- {{ $.Scratch.Set "bl_author" (.Get "author") }}
- {{ $.Scratch.Set "bl_source" (.Get "source") }}
- {{ $.Scratch.Set "bl_link" (.Get "link") }}
- {{ $.Scratch.Set "bl_title" (.Get "title") }}
-{{ else }}
-
-{{ end }}
-
-
-
-{{ with $.Scratch.Get "bl_title" }}
-
-{{ else }}
- {{ with $.Scratch.Get "bl_link" }}
- {{ range last 1 (split ($.Scratch.Get "bl_link" ) "://") }}
- {{ $.Scratch.Set "title_without_protocol" . }}
- {{ end }}
- {{ range last 1 (split ($.Scratch.Get "title_without_protocol" ) "www.") }}
- {{ $.Scratch.Set "title_without_protocol" . }}
- {{ end }}
- {{ $.Scratch.Set "bl_title" ($.Scratch.Get "title_without_protocol") }}
-
-
- {{ if (gt (len ($.Scratch.Get "title_without_protocol") ) 32) }}
- {{ $title := (slicestr ($.Scratch.Get "title_without_protocol") 0 32) }}
- {{ $split_by_fw_slash := split $title "/" }}
- {{ $count := (sub (len $split_by_fw_slash) 1) }}
-
- {{ $.Scratch.Set "tempstring" "" }}
- {{ range first $count $split_by_fw_slash }}
- {{ $.Scratch.Set "tempstring" ( . | printf "%s%s/" ($.Scratch.Get "tempstring") | printf "%s" ) }}
- {{ end }}
- {{ $.Scratch.Set "bl_title" ( printf "%s..." ($.Scratch.Get "tempstring") | printf "%s" ) }}
- {{ end }}
- {{ end }}
-{{ end }}
-
-
- {{ .Inner | markdownify }}
-
- {{ with $.Scratch.Get "bl_author" }}{{ . }}{{ end }}
- {{ with $.Scratch.Get "bl_source" }}
- {{ . }}
- {{ else }}
- {{ with $.Scratch.Get "bl_link" }}
-
- {{ $.Scratch.Get "bl_title" }}
-
- {{ else }}
- {{ with $.Scratch.Get "bl_title" }}
-
- {{ $.Scratch.Get "bl_title" }}
-
- {{ end }}
- {{ end }}
- {{ end }}
-
-
diff --git a/layouts/shortcodes/collapse.html b/layouts/shortcodes/collapse.html
index b92ad01..17d8d3b 100644
--- a/layouts/shortcodes/collapse.html
+++ b/layouts/shortcodes/collapse.html
@@ -1,12 +1,8 @@
-{{ if .Get "content" }}
{{ if .Get "summary" }}
{{ else }}
{{ warnf "missing value for param 'summary': %s" .Position }}
{{ end }}
-{{ else }}
-{{ errorf "missing value for param 'content': %s" .Position }}
-{{ end }}
{{ .Get "summary" | markdownify }}
- {{ .Get "content" | markdownify }}
+ {{ .Inner | markdownify }}
diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html
new file mode 100644
index 0000000..8c93eff
--- /dev/null
+++ b/layouts/shortcodes/figure.html
@@ -0,0 +1,31 @@
+
+ {{- if .Get "link" -}}
+
+ {{- end }}
+
+ {{- if .Get "link" }} {{ end -}}
+ {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
+
+ {{ with (.Get "title") -}}
+ {{ . }}
+ {{- end -}}
+ {{- if or (.Get "caption") (.Get "attr") -}}
+ {{- .Get "caption" | markdownify -}}
+ {{- with .Get "attrlink" }}
+
+ {{- end -}}
+ {{- .Get "attr" | markdownify -}}
+ {{- if .Get "attrlink" }} {{ end }}
+ {{- end }}
+
+ {{- end }}
+
diff --git a/layouts/shortcodes/inTextImg.html b/layouts/shortcodes/inTextImg.html
new file mode 100644
index 0000000..0239fd6
--- /dev/null
+++ b/layouts/shortcodes/inTextImg.html
@@ -0,0 +1,5 @@
+{{- $Img := (.Get "url") }}
+{{- $height := (.Get "height") }}
+{{- $alt := (.Get "alt") }}
+
+
diff --git a/layouts/shortcodes/ltr.html b/layouts/shortcodes/ltr.html
new file mode 100644
index 0000000..4ad7682
--- /dev/null
+++ b/layouts/shortcodes/ltr.html
@@ -0,0 +1,15 @@
+{{ $.Scratch.Set "md" false }}
+
+{{ if .IsNamedParams }}
+{{ $.Scratch.Set "md" (.Get "md") }}
+{{ else }}
+{{ $.Scratch.Set "md" (.Get 0) }}
+{{ end }}
+
+
+ {{ if eq ($.Scratch.Get "md") false }}
+ {{ .Inner }}
+ {{ else }}
+ {{ .Inner | markdownify }}
+ {{ end }}
+
diff --git a/layouts/shortcodes/rawhtml.html b/layouts/shortcodes/rawhtml.html
index 520ec17..9350c13 100644
--- a/layouts/shortcodes/rawhtml.html
+++ b/layouts/shortcodes/rawhtml.html
@@ -1,2 +1,2 @@
-{{.Inner}}
\ No newline at end of file
+{{- .Inner -}}
\ No newline at end of file
diff --git a/layouts/shortcodes/rtl.html b/layouts/shortcodes/rtl.html
new file mode 100644
index 0000000..a69b8ce
--- /dev/null
+++ b/layouts/shortcodes/rtl.html
@@ -0,0 +1,15 @@
+{{ $.Scratch.Set "md" false }}
+
+{{ if .IsNamedParams }}
+{{ $.Scratch.Set "md" (.Get "md") }}
+{{ else }}
+{{ $.Scratch.Set "md" (.Get 0) }}
+{{ end }}
+
+
+ {{ if eq ($.Scratch.Get "md") false }}
+ {{ .Inner }}
+ {{ else }}
+ {{ .Inner | markdownify }}
+ {{ end }}
+
diff --git a/theme.toml b/theme.toml
index 926792e..b49887d 100644
--- a/theme.toml
+++ b/theme.toml
@@ -5,7 +5,7 @@ name = "PaperMod"
license = "MIT"
licenselink = "https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE"
description = "A fast, clean, responsive Hugo theme"
-homepage = "https://github.com/adityatelange/hugo-PaperMod"
+homepage = "https://adityatelange.github.io/hugo-PaperMod/"
tags = [
"responsive",
"simple",
@@ -14,7 +14,8 @@ tags = [
"dark",
"blog",
"minimalist",
- "highlight.js"
+ "highlight.js",
+ "search"
]
features = [
"responsive",
@@ -33,9 +34,10 @@ features = [
"minified-assets",
"theme-toggle",
"menu-location-indicator",
- "scroll-to-top"
+ "scroll-to-top",
+ "search"
]
-min_version = "0.74.0"
+min_version = "0.83.0"
[author]
name = "Aditya Telange"