refactor: replace gulp by webpack and npm scripts (#258)
BREAKING CHANGE: We have replaced `gulp` with `webpack` and `npm scripts` to build this theme. If you build it on your own or use build commands during the deployment, you may have to adjust your setup. BREAKING CHANGE: The `GeekblogIcons` font is using the icon name as Unicode now. As a consequence, you have to replace all references to Icons from this font if you have customized the theme. BREAKING CHANGE: We have refactored the search integration to split Hugo templates from JavaScript code. To get it working again, you need to adjust the `outputFormats` and `outputs` in your Hugo configuration file, as [documented](https://geekdocs.de/usage/configuration/#site-configuration).
This commit is contained in:
parent
2ac2a9faab
commit
5c5e2d59cb
122 changed files with 18705 additions and 5208 deletions
|
@ -9,52 +9,64 @@
|
|||
{{ template "menu_nextprev" dict "sect" $.Site.Data.menu.main.main "current" $current "site" $site }}
|
||||
|
||||
{{ define "menu_nextprev" }}
|
||||
{{ $current := .current }}
|
||||
{{ $site := .site }}
|
||||
{{ $current := .current }}
|
||||
{{ $site := .site }}
|
||||
|
||||
{{ range sort (default (seq 0) .sect) "weight" }}
|
||||
{{ $current.Scratch.Set "current" $current }}
|
||||
{{ $current.Scratch.Set "site" $site }}
|
||||
{{ range sort (default (seq 0) .sect) "weight" }}
|
||||
{{ $current.Scratch.Set "current" $current }}
|
||||
{{ $current.Scratch.Set "site" $site }}
|
||||
|
||||
{{ $ref := default false .ref }}
|
||||
{{ if $ref}}
|
||||
{{ $site := $current.Scratch.Get "site" }}
|
||||
{{ $this := $site.GetPage .ref }}
|
||||
{{ $current := $current.Scratch.Get "current" }}
|
||||
{{ $ref := default false .ref }}
|
||||
{{ if $ref }}
|
||||
{{ $site := $current.Scratch.Get "site" }}
|
||||
{{ $this := $site.GetPage .ref }}
|
||||
{{ $current := $current.Scratch.Get "current" }}
|
||||
|
||||
{{ if $current.Scratch.Get "getNext" }}
|
||||
{{ $current.Scratch.Set "nextPage" (dict "name" .name "this" $this) }}
|
||||
{{ $current.Scratch.Set "getNext" false }}
|
||||
{{ end }}
|
||||
{{ if $current.Scratch.Get "getNext" }}
|
||||
{{ $current.Scratch.Set "nextPage" (dict "name" .name "this" $this) }}
|
||||
{{ $current.Scratch.Set "getNext" false }}
|
||||
{{ end }}
|
||||
|
||||
{{ if eq $current $this }}
|
||||
{{ $current.Scratch.Set "prevPage" ($current.Scratch.Get "prev") }}
|
||||
{{ $current.Scratch.Set "getNext" true }}
|
||||
{{ end }}
|
||||
{{ if eq $current $this }}
|
||||
{{ $current.Scratch.Set "prevPage" ($current.Scratch.Get "prev") }}
|
||||
{{ $current.Scratch.Set "getNext" true }}
|
||||
{{ end }}
|
||||
|
||||
{{ $current.Scratch.Set "prev" (dict "name" .name "this" $this) }}
|
||||
{{ end }}
|
||||
|
||||
{{ $sub := default false .sub }}
|
||||
{{ if $sub }}
|
||||
{{ template "menu_nextprev" dict "sect" $sub "current" ($current.Scratch.Get "current") "site" ($current.Scratch.Get "site") }}
|
||||
{{ end }}
|
||||
{{ $current.Scratch.Set "prev" (dict "name" .name "this" $this) }}
|
||||
{{ end }}
|
||||
|
||||
{{ $sub := default false .sub }}
|
||||
{{ if $sub }}
|
||||
{{ template "menu_nextprev" dict "sect" $sub "current" ($current.Scratch.Get "current") "site" ($current.Scratch.Get "site") }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
<div class="gdoc-page__footer flex flex-wrap justify-between">
|
||||
{{ $showPrevNext := (and (default true .Site.Params.GeekdocNextPrev) .Site.Params.GeekdocMenuBundle) }}
|
||||
{{ if $showPrevNext }}
|
||||
<span class="gdoc-page__nav">
|
||||
{{ with ($current.Scratch.Get "prevPage") }}
|
||||
<a class="gdoc-page__nav--prev flex align-center" href="{{.this.RelPermalink}}" title="{{ .name }}"> {{ .name }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
<span class="gdoc-page__nav">
|
||||
{{ with ($current.Scratch.Get "nextPage") }}
|
||||
<a class="gdoc-page__nav--next flex align-center" href="{{.this.RelPermalink}}" title="{{ .name }}">{{ .name }} </a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ $showPrevNext := (and (default true .Site.Params.GeekdocNextPrev) .Site.Params.GeekdocMenuBundle) }}
|
||||
{{ if $showPrevNext }}
|
||||
<span class="gdoc-page__nav">
|
||||
{{ with ($current.Scratch.Get "prevPage") }}
|
||||
<a
|
||||
class="gdoc-page__nav--prev flex align-center"
|
||||
href="{{ .this.RelPermalink }}"
|
||||
title="{{ .name }}"
|
||||
>
|
||||
{{ .name }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
<span class="gdoc-page__nav">
|
||||
{{ with ($current.Scratch.Get "nextPage") }}
|
||||
<a
|
||||
class="gdoc-page__nav--next flex align-center"
|
||||
href="{{ .this.RelPermalink }}"
|
||||
title="{{ .name }}"
|
||||
>
|
||||
{{ .name }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue