mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Create pages from _content.gotmpl
Closes #12427 Closes #12485 Closes #6310 Closes #5074
This commit is contained in:
@@ -321,7 +321,7 @@ func prepareShortcode(
|
||||
|
||||
// Allow the caller to delay the rendering of the shortcode if needed.
|
||||
var fn shortcodeRenderFunc = func(ctx context.Context) ([]byte, bool, error) {
|
||||
if p.m.pageConfig.IsGoldmark && sc.doMarkup {
|
||||
if p.m.pageConfig.ContentMediaType.IsMarkdown() && sc.doMarkup {
|
||||
// Signal downwards that the content rendered will be
|
||||
// parsed and rendered by Goldmark.
|
||||
ctx = tpl.Context.IsInGoldmark.Set(ctx, true)
|
||||
@@ -449,7 +449,7 @@ func doRenderShortcode(
|
||||
// unchanged.
|
||||
// 2 If inner does not have a newline, strip the wrapping <p> block and
|
||||
// the newline.
|
||||
switch p.m.pageConfig.Markup {
|
||||
switch p.m.pageConfig.Content.Markup {
|
||||
case "", "markdown":
|
||||
if match, _ := regexp.MatchString(innerNewlineRegexp, inner); !match {
|
||||
cleaner, err := regexp.Compile(innerCleanupRegexp)
|
||||
|
Reference in New Issue
Block a user