aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/page__content.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2020-03-09 12:04:33 +0100
committerBjørn Erik Pedersen <[email protected]>2020-03-09 15:01:55 +0100
commitffcb4aeb8e392a80da7cad0f1e03a4102efb24ec (patch)
tree945afe631ef8451f8a401b0a159a78b64e905713 /hugolib/page__content.go
parent8279d2e2271ee64725133d36a12d1d7e2158bffd (diff)
downloadhugo-ffcb4aeb8e392a80da7cad0f1e03a4102efb24ec.tar.gz
hugo-ffcb4aeb8e392a80da7cad0f1e03a4102efb24ec.zip
Fix handling of HTML files without front matter
This means that any HTML file inside /content will be treated as a regular file. If you want it processes with shortcodes and a layout, add front matter. The defintion of an HTML file here is: * File with extension .htm or .html * With first non-whitespace character "<" that isn't a HTML comment. This is in line with the documentation. Fixes #7030 Fixes #7028 See #6789
Diffstat (limited to 'hugolib/page__content.go')
-rw-r--r--hugolib/page__content.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/hugolib/page__content.go b/hugolib/page__content.go
index 013ab3072..91f26dc18 100644
--- a/hugolib/page__content.go
+++ b/hugolib/page__content.go
@@ -28,7 +28,6 @@ var (
// The content related items on a Page.
type pageContent struct {
- renderable bool
selfLayout string
truncated bool
@@ -52,7 +51,7 @@ func (p pageContent) contentToRender(renderedShortcodes map[string]string) []byt
case pageContentReplacement:
c = append(c, v.val...)
case *shortcode:
- if !p.renderable || !v.insertPlaceholder() {
+ if !v.insertPlaceholder() {
// Insert the rendered shortcode.
renderedShortcode, found := renderedShortcodes[v.placeholder]
if !found {