Merge remote-tracking branch 'upstream/main' into upstream

This commit is contained in:
phil 2023-07-14 07:54:27 +02:00
commit 95632a5aff
44 changed files with 2699 additions and 1489 deletions

View file

@ -1,4 +1,4 @@
{{ if default true .Site.Params.GeekdocSearch }}
{{ if default true .Site.Params.geekdocSearch }}
<script defer src="{{ index (index .Site.Data.assets "search.js") "src" | relURL }}"></script>
{{- $searchConfigFile := printf "search/%s.config.json" .Language.Lang -}}
{{- $searchConfig := resources.Get "search/config.json" | resources.ExecuteAsTemplate $searchConfigFile . | resources.Minify -}}

View file

@ -1,4 +1,4 @@
{{- if default true .Site.Params.GeekdocDarkModeToggle }}
{{- if default true .Site.Params.geekdocDarkModeToggle }}
<script src="{{ index (index .Site.Data.assets "colortheme.js") "src" | relURL }}"></script>
{{- end }}
<script src="{{ index (index .Site.Data.assets "main.js") "src" | relURL }}"></script>
@ -66,7 +66,7 @@
{{ printf `<link href=%q rel=%q type=%q />` .Permalink .Rel .MediaType.Type | safeHTML }}
{{- end }}
{{- if (default false $.Site.Params.GeekdocOverwriteHTMLBase) }}
{{- if (default false $.Site.Params.geekdocOverwriteHTMLBase) }}
<base href="{{ .Site.BaseURL }}" />
{{- end }}

View file

@ -25,7 +25,7 @@
{{ $isCurrent := eq $current $this }}
{{ $isAncestor := $this.IsAncestor $current }}
{{ $id := substr (sha1 $this.Permalink) 0 8 }}
{{ $doCollapse := and (isset . "sub") (or $this.Params.GeekdocCollapseSection (default false .Site.Params.GeekdocCollapseAllSections)) }}
{{ $doCollapse := and (isset . "sub") (or $this.Params.geekdocCollapseSection (default false .Site.Params.geekdocCollapseAllSections)) }}
{{ $anchor := default "" .anchor }}
{{ if $anchor }}

View file

@ -8,7 +8,7 @@
<ul class="gdoc-nav__list">
{{ $sortBy := (default "title" .current.Site.Params.GeekdocFileTreeSortBy | lower) }}
{{ $sortBy := (default "title" .current.Site.Params.geekdocFileTreeSortBy | lower) }}
{{ range .sect.GroupBy "Weight" }}
{{ $rangeBy := .ByTitle }}
@ -39,13 +39,13 @@
{{ end }}
{{ range $rangeBy }}
{{ if not .Params.GeekdocHidden }}
{{ if not .Params.geekdocHidden }}
{{ $numberOfPages := (add (len .Pages) (len .Sections)) }}
{{ $isParent := and (ne $numberOfPages 0) (not .Params.GeekdocFlatSection) }}
{{ $isParent := and (ne $numberOfPages 0) (not .Params.geekdocFlatSection) }}
{{ $isCurrent := eq $current . }}
{{ $isAncestor := .IsAncestor $current }}
{{ $id := substr (sha1 .Permalink) 0 8 }}
{{ $doCollapse := and $isParent (or .Params.GeekdocCollapseSection (default false .Site.Params.GeekdocCollapseAllSections)) }}
{{ $doCollapse := and $isParent (or .Params.geekdocCollapseSection (default false .Site.Params.geekdocCollapseAllSections)) }}
<li>
@ -63,7 +63,7 @@
for="{{ printf "navtree-%s" $id }}" class="flex justify-between align-center"
{{ end }}
>
{{ if or .Content .Params.GeekdocFlatSection }}
{{ if or .Content .Params.geekdocFlatSection }}
<span class="flex">
<a
href="{{ .RelPermalink }}"

View file

@ -49,7 +49,7 @@
{{ end }}
{{ end }}
{{ $showPrevNext := (and (default true .Site.Params.GeekdocNextPrev) .Site.Params.GeekdocMenuBundle) }}
{{ $showPrevNext := (and (default true .Site.Params.geekdocNextPrev) .Site.Params.geekdocMenuBundle) }}
{{ if $showPrevNext }}
<span class="gdoc-page__nav">
{{ with ($current.Scratch.Get "prevPage") }}

View file

@ -10,7 +10,7 @@
{{ end }}
</section>
{{ if and (in (slice "posts" "tags") .Section) (default false .Site.Params.GeekdocTagsToMenu) }}
{{ if and (in (slice "posts" "tags") .Section) (default false .Site.Params.geekdocTagsToMenu) }}
<section class="gdoc-nav--tags">
<h2>{{ i18n "nav_tags" }}</h2>
<ul class="gdoc-nav__list">

View file

@ -12,7 +12,7 @@
{{- with partial "utils/featured" . }}
"thumbnailUrl": {{ . }},
{{- end }}
{{- with .Site.Params.GeekdocContentLicense }}
{{- with .Site.Params.geekdocContentLicense }}
"license": "{{ .name }}",
{{- end }}
"inLanguage": {{ .Lang }}
@ -37,7 +37,7 @@
"thumbnailUrl": {{ . }},
{{- end }}
"wordCount" : "{{ .WordCount }}",
{{- with .Site.Params.GeekdocContentLicense }}
{{- with .Site.Params.geekdocContentLicense }}
"license": "{{ .name }}",
{{- end }}
"inLanguage": {{ .Lang }},

View file

@ -1,7 +1,7 @@
{{ $geekdocRepo := default (default false .Site.Params.GeekdocRepo) .Page.Params.GeekdocRepo }}
{{ $geekdocEditPath := default (default false .Site.Params.GeekdocEditPath) .Page.Params.GeekdocEditPath }}
{{ $geekdocRepo := default (default false .Site.Params.geekdocRepo) .Page.Params.geekdocRepo }}
{{ $geekdocEditPath := default (default false .Site.Params.geekdocEditPath) .Page.Params.geekdocEditPath }}
{{ if .File }}
{{ $.Scratch.Set "geekdocFilePath" (default (path.Join (default "content" .Site.Params.contentDir) .File.Path) .Page.Params.GeekdocFilePath) }}
{{ $.Scratch.Set "geekdocFilePath" (default (strings.TrimPrefix hugo.WorkingDir .File.Filename) .Page.Params.geekdocFilePath) }}
{{ else }}
{{ $.Scratch.Set "geekdocFilePath" false }}
{{ end }}
@ -18,7 +18,7 @@
{{ end }}
{{ end }}
{{ $showBreadcrumb := (and (default true .Page.Params.GeekdocBreadcrumb) (default true .Site.Params.GeekdocBreadcrumb)) }}
{{ $showBreadcrumb := (and (default true .Page.Params.geekdocBreadcrumb) (default true .Site.Params.geekdocBreadcrumb)) }}
{{ $showEdit := (and ($.Scratch.Get "geekdocFilePath") $geekdocRepo $geekdocEditPath) }}
<div
class="gdoc-page__header flex flex-wrap

View file

@ -1,4 +1,4 @@
{{ if default true .Site.Params.GeekdocSearch }}
{{ if default true .Site.Params.geekdocSearch }}
<div class="gdoc-search flex align-center">
<svg class="gdoc-icon gdoc_search"><use xlink:href="#gdoc_search"></use></svg>
<input

View file

@ -9,7 +9,7 @@
</a>
</span>
{{ end }}
{{ with .Site.Params.GeekdocPrivacyPolicy }}
{{ with .Site.Params.geekdocPrivacyPolicy }}
<span class="gdoc-footer__item gdoc-footer__item--row">
<a href="{{ . | relURL }}" class="gdoc-footer__link">
{{ i18n "footer_privacy_policy" }}
@ -17,7 +17,7 @@
</span>
{{ end }}
</section>
{{ with .Site.Params.GeekdocContentLicense }}
{{ with .Site.Params.geekdocContentLicense }}
<section class="flex flex-wrap align-center">
<span class="gdoc-footer__item">
{{ i18n "footer_content_license_prefix" }}
@ -26,7 +26,7 @@
</section>
{{ end }}
</div>
{{ if (default true .Site.Params.GeekdocBackToTop) }}
{{ if (default true .Site.Params.geekdocBackToTop) }}
<div class="flex flex-25 justify-end">
<span class="gdoc-footer__item text-right">
<a class="gdoc-footer__link fake-link" href="#" aria-label="{{ i18n "nav_top" }}">

View file

@ -17,7 +17,7 @@
<span class="flex align-center">
<img
class="gdoc-brand__img"
src="{{ (default "brand.svg" .Root.Site.Params.GeekdocLogo) | relURL }}"
src="{{ (default "brand.svg" .Root.Site.Params.geekdocLogo) | relURL }}"
alt=""
/>
<span class="gdoc-brand__title">{{ .Root.Site.Title }}</span>