From 162004b21eef69ecc18915786164adaeb136e641 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Tue, 8 Feb 2022 21:26:40 +0000 Subject: [PATCH] refactor: site.params.edit_page -> site.Params.features.repository BREAKING CHANGE See #2601 --- wowchemy/layouts/partials/page_edit.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wowchemy/layouts/partials/page_edit.html b/wowchemy/layouts/partials/page_edit.html index 61dbe3e6..f46c9919 100644 --- a/wowchemy/layouts/partials/page_edit.html +++ b/wowchemy/layouts/partials/page_edit.html @@ -1,16 +1,16 @@ {{/* Add link to let visitors edit the page on GitHub. */}} -{{ if .Params.editable | and site.Params.edit_page.repo_url }} +{{ if .Params.editable | and site.Params.features.repository.url }} {{/* Get language subfolder for multilingual sites. */}} {{/* Limitations: the subfolder param, `.contentDir`, is unexposed in the Hugo `site` API so we attempt to workaround this issue. */}} {{ $content_dir := "content" }} -{{ if site.Params.edit_page.content_dir }} - {{ $content_dir = site.Params.edit_page.content_dir }} +{{ if site.Params.features.repository.content_dir }} + {{ $content_dir = site.Params.features.repository.content_dir }} {{else}} {{/* Attempt to get content dir from the LanguagePrefix URI, but defaultContentLanguageInSubdir can break this assumption. */}} {{ $content_dir = cond site.IsMultiLingual (cond (ne .Site.LanguagePrefix "") (printf "%s%s" $content_dir .Site.LanguagePrefix) $content_dir) $content_dir }} {{end}}

- + {{ i18n "edit_page" | default "Edit this page" }}