feat: Introduce liquid templates

This commit is contained in:
sthag 2025-10-26 15:19:14 +01:00
parent c1fea8064e
commit 07656b404f
3 changed files with 31 additions and 4 deletions

View file

@ -1,6 +1,14 @@
module.exports = function (eleventyConfig) {
// eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
eleventyConfig.setLiquidOptions({
// greedy: false,
// trimOutputLeft: true,
// trimOutputRight: true,
// trimTagLeft: true,
// trimTagRight : true,
});
eleventyConfig.setNunjucksEnvironmentOptions({
// throwOnUndefined: true,
trimBlocks: true
@ -43,9 +51,7 @@ module.exports = function (eleventyConfig) {
includes: "../templates",
data: "../data"
},
markdownTemplateEngine: "njk",
htmlTemplateEngine: "njk",
templateFormats: ["html", "njk", "md"],
templateFormats: ["html", "liquid", "njk", "md"]
// pathPrefix: './demo/'
}
};
};

10
source/screens/hello.md Normal file
View file

@ -0,0 +1,10 @@
---
title: "Hello World"
tags:
- demoIndex
layout: hippie/world.liquid
---
# {{ title }}
This is a simple example for a *screen* written in Markdown, using Liquid *templates*.

View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<title>{{ title }}</title>
</head>
<body>
{{ content }}
</body>
</html>