diff --git a/v2/add-legacy-urls-to-posts-list.patch b/v2/add-legacy-urls-to-posts-list.patch new file mode 100644 index 0000000..f816817 --- /dev/null +++ b/v2/add-legacy-urls-to-posts-list.patch @@ -0,0 +1,28 @@ +--- themes/cupper-hugo-theme/layouts/_default/list.html 2022-12-05 19:56:43.667815118 +0100 ++++ themes/cupper-hugo-theme/layouts/_default/list.html 2022-12-18 17:11:11.846547314 +0100 +@@ -27,6 +27,25 @@ + + + {{ end }} ++ {{ if (eq .Type "post") }} ++ {{ range $.Site.Data.LegacyBlogUrls }} ++
  • ++

    ++ ++ ++ {{ .metas.title }} ++ ++

    ++
  • ++ {{ end }} ++ {{ end }} + + + {{ end }} diff --git a/v2/add-posts-links-left-menu.patch b/v2/add-posts-links-left-menu.patch new file mode 100644 index 0000000..e49934e --- /dev/null +++ b/v2/add-posts-links-left-menu.patch @@ -0,0 +1,19 @@ +--- themes/cupper-hugo-theme/layouts/partials/nav.html 2022-12-05 19:58:23.175031691 +0100 ++++ themes/cupper-hugo-theme/layouts/partials/nav.html 2022-12-08 13:03:13.995570393 +0100 +@@ -11,8 +11,7 @@ + {{ range .Site.Menus.nav }} +
  • + {{ $active := or ($current.IsMenuCurrent "nav" .) ($current.HasMenuCurrent "nav" .) }} +- {{ $active = or $active (eq .Name $current.Title) }} +- {{ $active = or $active (and (eq .Name "Blog") (eq $current.Section "post")) }} ++ {{ $active = or $active (eq .URL $current.RelPermalink) }} + {{ $active = or $active (and (eq .Name "Tags") (eq $current.Section "tags")) }} + +
  • + {{ end }} + +- +\ No newline at end of file ++ diff --git a/v2/patching.sh b/v2/patching.sh new file mode 100755 index 0000000..c12f55c --- /dev/null +++ b/v2/patching.sh @@ -0,0 +1,4 @@ +#!/bin/bash +git submodule update --recursive --remote +patch -p0 < add-posts-links-left-menu.patch --output=layouts/partials/nav.html +patch -p0 < add-legacy-urls-to-posts-list.patch --output=layouts/_default/list.html