Awesome frontmatter (#617)

Live Frontmatter Templates
This commit is contained in:
Zef Hemel
2024-01-04 20:08:12 +01:00
committed by GitHub
parent 9040993232
commit 91027af5fe
53 changed files with 646 additions and 342 deletions
+14 -1
View File
@@ -267,7 +267,10 @@ function render(
}
case "Hashtag":
return {
name: "strong",
name: "span",
attrs: {
class: "hashtag",
},
body: t.children![0].text!,
};
@@ -414,6 +417,16 @@ function render(
case "Entity":
return t.children![0].text!;
case "TemplateDirective": {
return {
name: "span",
attrs: {
class: "template-directive",
},
body: renderToText(t),
};
}
// Text
case undefined:
return t.text!;