-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: upgrade hugo to 0.128.2 version and fix issues (#240)
- Upgrade Hugo and use 0.128.2 version. - Fix pagination and breadcrumb issues. - Fix deprecated issue of `.Site.IsServer` by using `hugo.isServer`.
- Loading branch information
1 parent
1468d5f
commit 0078705
Showing
4 changed files
with
67 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,54 @@ | ||
{{ if .File.Path }} | ||
{{ if .File }} | ||
{{ if .File.Path }} | ||
|
||
{{ $context := . }} | ||
{{ $context := . }} | ||
|
||
{{ $menus := partial "docs/sequential-order-menu.html" (dict | ||
"context" $context | ||
"menuEntries" .Site.Menus.docs_sidebar | ||
) }} | ||
{{ $menus := partial "docs/sequential-order-menu.html" (dict | ||
"context" $context | ||
"menuEntries" .Site.Menus.docs_sidebar | ||
) }} | ||
|
||
{{ $prev := "" }} | ||
{{ $next := "" }} | ||
{{ $prev := "" }} | ||
{{ $next := "" }} | ||
|
||
{{ range $index, $menu := $menus }} | ||
{{ if eq $menu.Page $context.Page }} | ||
{{ $prev = index $menus (sub $index 1)}} | ||
{{ $next = index $menus (add $index 1)}} | ||
{{ end }} | ||
{{ end }} | ||
|
||
<nav class="py-16"> | ||
<ul class="grid grid-cols-1 lg:grid-cols-2 justify-between gap-4"> | ||
<li> | ||
{{ if $prev }} | ||
<a href="{{ $prev.URL }}" | ||
class="w-full h-full px-4 py-3 lg:p-4 flex justify-between gap-x-4 border border-gray-300 hover:border-red-400 rounded-lg font-medium text-base text-red-600"> | ||
<span> | ||
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-gray-500" fill="none" viewBox="0 0 24 24" | ||
stroke="currentColor"> | ||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18" /> | ||
</svg> | ||
</span> | ||
<span class="flex-1 text-right">{{ $prev.Name }}</span> | ||
</a> | ||
{{ end }} | ||
</li> | ||
<li> | ||
{{ if $next }} | ||
<a href="{{ $next.URL }}" | ||
class="w-full h-full px-4 py-3 lg:p-4 flex justify-between gap-x-4 border border-gray-300 hover:border-red-400 rounded-lg font-medium text-base text-red-600"> | ||
<span class="flex-1 text-left">{{ $next.Name}}</span> | ||
<span> | ||
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-gray-500" fill="none" viewBox="0 0 24 24" | ||
stroke="currentColor"> | ||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14 5l7 7m0 0l-7 7m7-7H3" /> | ||
</svg> | ||
</span> | ||
</a> | ||
{{ range $index, $menu := $menus }} | ||
{{ if eq $menu.Page $context.Page }} | ||
{{ $prev = index $menus (sub $index 1)}} | ||
{{ $next = index $menus (add $index 1)}} | ||
{{ end }} | ||
</li> | ||
</ul> | ||
</nav> | ||
{{ end }} | ||
|
||
<nav class="py-16"> | ||
<ul class="grid grid-cols-1 lg:grid-cols-2 justify-between gap-4"> | ||
<li> | ||
{{ if $prev }} | ||
<a href="{{ $prev.URL }}" | ||
class="w-full h-full px-4 py-3 lg:p-4 flex justify-between gap-x-4 border border-gray-300 hover:border-red-400 rounded-lg font-medium text-base text-red-600"> | ||
<span> | ||
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-gray-500" fill="none" viewBox="0 0 24 24" | ||
stroke="currentColor"> | ||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18" /> | ||
</svg> | ||
</span> | ||
<span class="flex-1 text-right">{{ $prev.Name }}</span> | ||
</a> | ||
{{ end }} | ||
</li> | ||
<li> | ||
{{ if $next }} | ||
<a href="{{ $next.URL }}" | ||
class="w-full h-full px-4 py-3 lg:p-4 flex justify-between gap-x-4 border border-gray-300 hover:border-red-400 rounded-lg font-medium text-base text-red-600"> | ||
<span class="flex-1 text-left">{{ $next.Name}}</span> | ||
<span> | ||
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-gray-500" fill="none" viewBox="0 0 24 24" | ||
stroke="currentColor"> | ||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14 5l7 7m0 0l-7 7m7-7H3" /> | ||
</svg> | ||
</span> | ||
</a> | ||
{{ end }} | ||
</li> | ||
</ul> | ||
</nav> | ||
{{ end }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters