aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/disableKinds_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2020-10-06 11:19:31 +0200
committerBjørn Erik Pedersen <[email protected]>2020-10-06 14:06:10 +0200
commit634938908ec8f393b9a05d26b4cfe19ca7abb0d0 (patch)
tree4726d31ba07f7391bade0b21a43694c29278fc69 /hugolib/disableKinds_test.go
parentc63db7f1f6774a2d661af1d8197c6fe377e3ad25 (diff)
downloadhugo-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/disableKinds_test.go')
-rw-r--r--hugolib/disableKinds_test.go24
1 files changed, 23 insertions, 1 deletions
diff --git a/hugolib/disableKinds_test.go b/hugolib/disableKinds_test.go
index 4f12ee2b5..381442d69 100644
--- a/hugolib/disableKinds_test.go
+++ b/hugolib/disableKinds_test.go
@@ -54,7 +54,15 @@ title: No List
_build:
render: false
---
-`, "sect/no-publishresources/index.md", `
+`,
+ "sect/no-render-link.md", `
+---
+title: No Render Link
+_build:
+ render: link
+---
+`,
+ "sect/no-publishresources/index.md", `
---
title: No Publish Resources
_build:
@@ -303,6 +311,20 @@ title: Headless Local Lists Sub
b.Assert(getPageInPagePages(sect, ref), qt.Not(qt.IsNil))
})
+ c.Run("Build config, no render link", func(c *qt.C) {
+ b := newSitesBuilder(c, disableKind)
+ b.Build(BuildCfg{})
+ ref := "/sect/no-render-link.md"
+ b.Assert(b.CheckExists("public/sect/no-render/index.html"), qt.Equals, false)
+ p := getPage(b, ref)
+ b.Assert(p, qt.Not(qt.IsNil))
+ b.Assert(p.RelPermalink(), qt.Equals, "/blog/sect/no-render-link/")
+ b.Assert(p.OutputFormats(), qt.HasLen, 0)
+ b.Assert(getPageInSitePages(b, ref), qt.Not(qt.IsNil))
+ sect := getPage(b, "/sect")
+ b.Assert(getPageInPagePages(sect, ref), qt.Not(qt.IsNil))
+ })
+
c.Run("Build config, no publish resources", func(c *qt.C) {
b := newSitesBuilder(c, disableKind)
b.Build(BuildCfg{})