Add path, kind and lang to content front matter

Note that none of these can be set via cascade (you will get an error)

Fixes #11544
This commit is contained in:
Bjørn Erik Pedersen
2024-01-29 10:02:24 +01:00
parent ec22bb31a8
commit f31a6db797
22 changed files with 707 additions and 429 deletions

View File

@@ -315,7 +315,7 @@ func prepareShortcode(
isRenderString bool,
) (shortcodeRenderer, error) {
toParseErr := func(err error) error {
source := p.content.mustSource()
source := p.m.content.mustSource()
return p.parseError(fmt.Errorf("failed to render shortcode %q: %w", sc.name, err), source, sc.pos)
}
@@ -443,7 +443,7 @@ func doRenderShortcode(
// unchanged.
// 2 If inner does not have a newline, strip the wrapping <p> block and
// the newline.
switch p.m.markup {
switch p.m.pageConfig.Markup {
case "", "markdown":
if match, _ := regexp.MatchString(innerNewlineRegexp, inner); !match {
cleaner, err := regexp.Compile(innerCleanupRegexp)