Replace deprecated Page.Dir with Page.File.Dir (#988)

This commit is contained in:
Andrew Morgan 2022-03-29 15:03:41 +01:00 committed by GitHub
parent 46f98796b6
commit 5a54ca66d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View file

@ -9,5 +9,5 @@
{{ $name := .Params.name }}
{{ $page := .Site.GetPage (path.Join .Page.Dir "modules" (printf "%s%s" $name ".md"))}}
{{ $page.Content }}
{{ $page := .Site.GetPage (path.Join .Page.File.Dir "modules" (printf "%s%s" $name ".md"))}}
{{ $page.Content }}

View file

@ -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]" "") }}