summaryrefslogtreecommitdiffstats
path: root/hugolib/page__paths.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-10-06 11:19:31 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-10-06 14:06:10 +0200
commit634938908ec8f393b9a05d26b4cfe19ca7abb0d0 (patch)
tree4726d31ba07f7391bade0b21a43694c29278fc69 /hugolib/page__paths.go
parentc63db7f1f6774a2d661af1d8197c6fe377e3ad25 (diff)
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.go6
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)
}