mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 22:21:07 +03:00
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
This commit is contained in:
parent
8279d2e227
commit
ffcb4aeb8e
18 changed files with 168 additions and 309 deletions
|
@ -408,7 +408,7 @@ func renderShortcode(
|
|||
}
|
||||
|
||||
func (s *shortcodeHandler) hasShortcodes() bool {
|
||||
return len(s.shortcodes) > 0
|
||||
return s != nil && len(s.shortcodes) > 0
|
||||
}
|
||||
|
||||
func (s *shortcodeHandler) renderShortcodesForPage(p *pageState, f output.Format) (map[string]string, bool, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue