From cd0d6116b6d31744e09daa701fea7e9387050c76 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Tue, 8 Mar 2022 14:02:21 +0000 Subject: [PATCH] Replace deprecated Page.Dir with Page.File.Dir Page.Dir has been deprecated for a while, and was finally removed in hugo v0.93.0. This commit replaces instances of Page.Dir with Page.File.Dir. --- layouts/shortcodes/cs-module.html | 4 ++-- layouts/shortcodes/rver-fragment.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/shortcodes/cs-module.html b/layouts/shortcodes/cs-module.html index bd407df6..7bb6f581 100644 --- a/layouts/shortcodes/cs-module.html +++ b/layouts/shortcodes/cs-module.html @@ -9,5 +9,5 @@ {{ $name := .Params.name }} -{{ $page := .Site.GetPage (path.Join .Page.Dir "modules" (printf "%s%s" $name ".md"))}} -{{ $page.Content }} \ No newline at end of file +{{ $page := .Site.GetPage (path.Join .Page.File.Dir "modules" (printf "%s%s" $name ".md"))}} +{{ $page.Content }} diff --git a/layouts/shortcodes/rver-fragment.html b/layouts/shortcodes/rver-fragment.html index 12c4d122..14a8a027 100644 --- a/layouts/shortcodes/rver-fragment.html +++ b/layouts/shortcodes/rver-fragment.html @@ -17,7 +17,7 @@ {{ $name := .Params.name }} {{ $withVersioning := .Params.withVersioning }} -{{ $page := .Site.GetPage (path.Join .Page.Dir "fragments" (printf "%s%s" $name ".md"))}} +{{ $page := .Site.GetPage (path.Join .Page.File.Dir "fragments" (printf "%s%s" $name ".md"))}} {{ $content := $page.Content }} {{ if not $withVersioning }} {{ $content = (replace $content "[New in this version]" "") }}