diff --git a/layouts/404.html b/layouts/404.html index e3a5efc..6fac33d 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -8,9 +8,9 @@

{{- i18n "pageNotFound" -}}

{{- i18n "pageNotFoundAction" . -}}

- {{ i18n "homepage" }} + {{ i18n "homepage" }} • - {{ i18n "contact" }} + {{ i18n "contact" }}

{{ end }} diff --git a/layouts/robots.txt b/layouts/robots.txt index 3303268..6759cb8 100644 --- a/layouts/robots.txt +++ b/layouts/robots.txt @@ -1,6 +1,6 @@ User-agent: * {{/* If ENV production variable is false robots will be disallowed. */}} -{{ if eq $.Site.Params.env "production" }} +{{ if eq site.Params.env "production" }} Disallow: {{ else }} Disallow: / diff --git a/layouts/shortcodes/cv/awards.gohtml b/layouts/shortcodes/cv/awards.gohtml index cb224e7..69b2e5d 100644 --- a/layouts/shortcodes/cv/awards.gohtml +++ b/layouts/shortcodes/cv/awards.gohtml @@ -1,4 +1,4 @@ -{{- $awards := $.Site.Data.awards -}} +{{- $awards := site.Data.awards -}} {{- $awards = sort $awards "month" "desc" -}} {{- $awards = sort $awards "year" "desc" -}}
@@ -26,7 +26,7 @@ {{- end -}} {{- with .value -}}   - {{- lang.NumFmt 0 .sum "- , ." -}} {{- .unit -}} + {{- lang.FormatNumberCustom 0 .sum "- , ." -}} {{- .unit -}} {{- end -}} {{- with .description -}}
diff --git a/layouts/shortcodes/cv/education.gohtml b/layouts/shortcodes/cv/education.gohtml index b83b278..312d3cb 100644 --- a/layouts/shortcodes/cv/education.gohtml +++ b/layouts/shortcodes/cv/education.gohtml @@ -1,4 +1,4 @@ -{{- $education := $.Site.Data.education -}} +{{- $education := site.Data.education -}} {{- $education = sort $education "from.month" "desc" -}} {{- $education = sort $education "from.year" "desc" -}}
diff --git a/layouts/shortcodes/cv/experience.gohtml b/layouts/shortcodes/cv/experience.gohtml index 4bd5265..e8a27cf 100644 --- a/layouts/shortcodes/cv/experience.gohtml +++ b/layouts/shortcodes/cv/experience.gohtml @@ -1,4 +1,4 @@ -{{- $experience := $.Site.Data.experience -}} +{{- $experience := site.Data.experience -}}
diff --git a/layouts/shortcodes/cv/facts.gohtml b/layouts/shortcodes/cv/facts.gohtml index aa965c9..04d1c6c 100644 --- a/layouts/shortcodes/cv/facts.gohtml +++ b/layouts/shortcodes/cv/facts.gohtml @@ -1,4 +1,4 @@ -{{- with $.Site.Data.facts -}} +{{- with site.Data.facts -}}
@@ -17,7 +17,7 @@ - + diff --git a/layouts/shortcodes/cv/highest-degree.gohtml b/layouts/shortcodes/cv/highest-degree.gohtml index 712f805..2367f72 100644 --- a/layouts/shortcodes/cv/highest-degree.gohtml +++ b/layouts/shortcodes/cv/highest-degree.gohtml @@ -1,4 +1,4 @@ -{{- with $.Site.Data.education -}} +{{- with site.Data.education -}} {{- $education := . -}} {{- $education = where $education "to.year" ">" 0 -}} {{- $education = sort $education "to.month" "desc" -}} diff --git a/layouts/shortcodes/cv/open-source.gohtml b/layouts/shortcodes/cv/open-source.gohtml index 621c5d6..cd27304 100644 --- a/layouts/shortcodes/cv/open-source.gohtml +++ b/layouts/shortcodes/cv/open-source.gohtml @@ -1,5 +1,5 @@ -{{- $username := $.Site.Data.social.github -}} -{{- with $.Site.Params.gitHubToken -}} +{{- $username := site.Data.social.github -}} +{{- with site.Params.gitHubToken -}} {{- $username = print $username ":" . -}} {{- end -}} @@ -43,14 +43,14 @@ query { {{- with resources.GetRemote "https://api.github.com/graphql" $pinnedReposOpts -}} {{- with .Err -}}{{- errorf "%s" . -}}{{- end -}} - {{- with .Content | transform.Unmarshal -}} + {{- with .Content | unmarshal -}}
{{- i18n "birthday" -}}{{- time.Format ":date_long" .birthday -}}{{- dateFormat ":date_long" .birthday -}}
{{- i18n "email" -}}
{{- range .data.user.pinnedItems.nodes -}}
- {{- time.Format "01/2006" .createdAt -}} + {{- dateFormat "01/2006" .createdAt -}} diff --git a/layouts/shortcodes/cv/publications.gohtml b/layouts/shortcodes/cv/publications.gohtml index 0063ffb..099d4f6 100644 --- a/layouts/shortcodes/cv/publications.gohtml +++ b/layouts/shortcodes/cv/publications.gohtml @@ -1,4 +1,4 @@ -{{- $author := $.Site.Data.facts.name -}} +{{- $author := site.Data.facts.name -}} {{- $webisPublicationsUrl := "https://webis.de/publications.html" -}} @@ -20,7 +20,7 @@ {{- $xmlText = replace $xmlText " " " " -}} {{- $xmlText = replace $xmlText "&" "&" -}} {{- $xmlText = replace $xmlText "&" "&" -}} - {{- $htmlEntities := resources.Get "csv/html-entities.csv" | transform.Unmarshal (dict "delimiter" ",") -}} + {{- $htmlEntities := resources.Get "csv/html-entities.csv" | unmarshal (dict "delimiter" ",") -}} {{- range $htmlEntities -}} {{- $htmlEntityGlyph := index . 0 -}} {{- $htmlEntityName := index . 1 -}} @@ -40,7 +40,7 @@ {{- $xmlResource := $xmlText | resources.FromString $xmlTargetPath -}} {{/* Parse XML as map. */}} - {{- with $xmlResource | transform.Unmarshal -}} + {{- with $xmlResource | unmarshal -}} {{/* Navigate to publication list year entries. */}} {{- $element := . -}} {{- $element = index $element "body" -}} diff --git a/layouts/shortcodes/cv/skills.gohtml b/layouts/shortcodes/cv/skills.gohtml index 5de009f..ce6e068 100644 --- a/layouts/shortcodes/cv/skills.gohtml +++ b/layouts/shortcodes/cv/skills.gohtml @@ -1,4 +1,4 @@ -{{- with $.Site.Data.skills -}} +{{- with site.Data.skills -}}
diff --git a/layouts/shortcodes/github/repos.gohtml b/layouts/shortcodes/github/repos.gohtml index 563a859..35ec6a4 100644 --- a/layouts/shortcodes/github/repos.gohtml +++ b/layouts/shortcodes/github/repos.gohtml @@ -1,5 +1,5 @@ -{{- $username := $.Site.Data.social.github -}} -{{- with $.Site.Params.gitHubToken -}} +{{- $username := site.Data.social.github -}} +{{- with site.Params.gitHubToken -}} {{- $username = print $username ":" . -}} {{- end -}} {{- if not $username -}} @@ -43,7 +43,7 @@ query { {{- $userUrl := "" -}} {{- with resources.GetRemote "https://api.github.com/graphql" $userOpts -}} {{- with .Err -}}{{- errorf "%s" . -}}{{- end -}} - {{- with .Content | transform.Unmarshal -}} + {{- with .Content | unmarshal -}} {{- $repositoriesCount = .data.user.repositories.totalCount -}} {{- $userUrl = .data.user.url -}} {{- else -}} @@ -112,7 +112,7 @@ query { {{- $reposCount := 0 -}} {{- with resources.GetRemote "https://api.github.com/graphql" $reposOpts -}} {{- with .Err -}}{{- errorf "%s" . -}}{{- end -}} - {{- with .Content | transform.Unmarshal -}} + {{- with .Content | unmarshal -}} {{- with .data.user.repositories.nodes -}} {{- $repositories = append $repositories . -}} {{- end -}} @@ -216,8 +216,8 @@ query { {{- $kilobytes := div $bytes 1000 -}} {{- $megabytes := div $kilobytes 1000 -}} - 📚 {{ .reposCount }}
- 💾 {{- $megabytes | lang.FormatNumber 2 -}} MB + 📚 {{ .reposCount }}  + 💾 {{- $megabytes | lang.FormatNumber 2 -}} MB
@@ -241,7 +241,7 @@ query { {{- $description -}}
- 📅 {{ time.Format ":date_short" .pushedAt }}  + 📅 {{ dateFormat ":date_short" .pushedAt }}  ⭐ {{ .stargazerCount }} {{- end -}} @@ -268,9 +268,9 @@ query { {{- $moreRepos = sort $moreRepos "stargazers_count" "desc" -}} {{/* Cut-off after top-3. */}} {{- $moreRepos = first 3 $moreRepos -}} - diff --git a/layouts/shortcodes/github/stats.gohtml b/layouts/shortcodes/github/stats.gohtml index 86d3e87..9237470 100644 --- a/layouts/shortcodes/github/stats.gohtml +++ b/layouts/shortcodes/github/stats.gohtml @@ -1,5 +1,5 @@ -{{- $username := $.Site.Data.social.github -}} -{{- with $.Site.Params.gitHubToken -}} +{{- $username := site.Data.social.github -}} +{{- with site.Params.gitHubToken -}} {{- $username = print $username ":" . -}} {{- end -}} {{- if not $username -}} @@ -10,7 +10,7 @@ {{- $osiApprovedLicenses := slice -}} {{- with resources.GetRemote "https://github.com/spdx/license-list-data/raw/main/json/licenses.json" -}} {{- with .Err -}}{{- errorf "%s" . -}}{{- end -}} - {{- with .Content | transform.Unmarshal -}} + {{- with .Content | unmarshal -}} {{- range (where .licenses "isOsiApproved" true) -}} {{- $osiApprovedLicenses = append .licenseId $osiApprovedLicenses -}} {{- end -}} @@ -66,7 +66,7 @@ query { {{- $organizationsCount := 0 -}} {{- with resources.GetRemote "https://api.github.com/graphql" $userOpts -}} {{- with .Err -}}{{- errorf "%s" . -}}{{- end -}} - {{- with .Content | transform.Unmarshal -}} + {{- with .Content | unmarshal -}} {{/* Count repos. */}} {{- $repositoriesCount = .data.user.repositories.totalCount -}} {{/* Count followers. */}} @@ -124,7 +124,7 @@ query { {{- $reposCount := 0 -}} {{- with resources.GetRemote "https://api.github.com/graphql" $reposOpts -}} {{- with .Err -}}{{- errorf "%s" . -}}{{- end -}} - {{- with .Content | transform.Unmarshal -}} + {{- with .Content | unmarshal -}} {{- with .data.user.repositories.nodes -}} {{- $repositories = append $repositories . -}} {{- end -}} @@ -163,7 +163,7 @@ query { {{- $contributionsOpts := dict "method" "post" "body" $contributionsBody "headers" $githubHeaders -}} {{- with resources.GetRemote "https://api.github.com/graphql" $contributionsOpts -}} {{- with .Err -}}{{- errorf "%s" . -}}{{- end -}} - {{- with .Content | transform.Unmarshal -}} + {{- with .Content | unmarshal -}} {{- with .data.user.contributionsCollection -}} {{- $totalCommitContributions = add $totalCommitContributions .totalCommitContributions -}} {{- $totalIssueContributions = add $totalIssueContributions .totalIssueContributions -}} diff --git a/layouts/shortcodes/github/tag.gohtml b/layouts/shortcodes/github/tag.gohtml index 1f82f50..4aacea5 100644 --- a/layouts/shortcodes/github/tag.gohtml +++ b/layouts/shortcodes/github/tag.gohtml @@ -1,5 +1,5 @@ -{{- $username := $.Site.Data.social.github -}} -{{- with $.Site.Params.gitHubToken -}} +{{- $username := site.Data.social.github -}} +{{- with site.Params.gitHubToken -}} {{- $username = print $username ":" . -}} {{- end -}} {{- if not $username -}} @@ -26,7 +26,7 @@ query { {{- $userOpts := dict "method" "post" "body" $userBody "headers" $githubHeaders -}} {{- with resources.GetRemote "https://api.github.com/graphql" $userOpts -}} {{- with .Err -}}{{- errorf "%s" . -}}{{- end -}} - {{- with .Content | transform.Unmarshal -}} + {{- with .Content | unmarshal -}} @{{ .data.user.login }} {{- else -}} {{- errorf "Unable to parse GitHub GraphQL API response." -}} diff --git a/layouts/shortcodes/profile-image.gohtml b/layouts/shortcodes/profile-image.gohtml index 159a472..d8e1272 100644 --- a/layouts/shortcodes/profile-image.gohtml +++ b/layouts/shortcodes/profile-image.gohtml @@ -1,11 +1,8 @@ -{{- $resource := resources.Get "profile.jpg" -}} -{{- $title := i18n "profile" -}} -{{- with $resource -}} - {{- $link := $resource.RelPermalink -}} +{{- with resources.Get "profile.jpg" -}}
- + {{- with .Fit "400x400" -}} - {{ . }} + {{ i18n {{- end -}}
diff --git a/layouts/shortcodes/sponsors.gohtml b/layouts/shortcodes/sponsors.gohtml index 92f94d3..8ec7065 100644 --- a/layouts/shortcodes/sponsors.gohtml +++ b/layouts/shortcodes/sponsors.gohtml @@ -1,4 +1,4 @@ -{{ with $.Site.Data.sponsors }} +{{ with site.Data.sponsors }}
    {{ range .sponsors }}
+ {{- range $moreRepos -}} - {{ .name }}
+ {{ .name }}
{{- end -}}