diff options
author | Bjørn Erik Pedersen <[email protected]> | 2020-10-06 11:19:31 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2020-10-06 14:06:10 +0200 |
commit | 634938908ec8f393b9a05d26b4cfe19ca7abb0d0 (patch) | |
tree | 4726d31ba07f7391bade0b21a43694c29278fc69 /hugolib/page__paths.go | |
parent | c63db7f1f6774a2d661af1d8197c6fe377e3ad25 (diff) | |
download | hugo-634938908ec8f393b9a05d26b4cfe19ca7abb0d0.tar.gz hugo-634938908ec8f393b9a05d26b4cfe19ca7abb0d0.zip |
pagemeta: Make BuildConfig.Render an enum
Allowing links on pages without rendering them.
Fixes #7783
Diffstat (limited to 'hugolib/page__paths.go')
-rw-r--r-- | hugolib/page__paths.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hugolib/page__paths.go b/hugolib/page__paths.go index d0bf26961..535c60ba0 100644 --- a/hugolib/page__paths.go +++ b/hugolib/page__paths.go @@ -51,9 +51,11 @@ func newPagePaths( var relPermalink, permalink string - // If a page is headless or marked as "no render", or bundled in another, + // If a page is headless or bundled in another, // it will not get published on its own and it will have no links. - if !pm.noRender() && !pm.bundled { + // We also check the build options if it's set to not render or have + // a link. + if !pm.noLink() && !pm.bundled { relPermalink = paths.RelPermalink(s.PathSpec) permalink = paths.PermalinkForOutputFormat(s.PathSpec, f) } |