feat: Introduce liquid templates
This commit is contained in:
parent
c1fea8064e
commit
07656b404f
3 changed files with 31 additions and 4 deletions
14
.eleventy.js
14
.eleventy.js
|
|
@ -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
10
source/screens/hello.md
Normal 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*.
|
||||
11
source/templates/hippie/world.liquid
Normal file
11
source/templates/hippie/world.liquid
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ title }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{{ content }}
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue