feat: Add liquid root setting
Set root in eleventy config with setLiquidOptions to include hippie files.
This commit is contained in:
parent
d4eb2f743b
commit
6ab274b4bb
1 changed files with 15 additions and 14 deletions
13
.eleventy.js
13
.eleventy.js
|
|
@ -1,6 +1,7 @@
|
||||||
/* jshint strict: false */
|
/* jshint strict: false */
|
||||||
|
|
||||||
import fs from 'fs/promises';
|
import fs from "node:fs";
|
||||||
|
import path from "node:path";
|
||||||
import { HtmlBasePlugin } from "@11ty/eleventy";
|
import { HtmlBasePlugin } from "@11ty/eleventy";
|
||||||
import pluginWebc from "@11ty/eleventy-plugin-webc";
|
import pluginWebc from "@11ty/eleventy-plugin-webc";
|
||||||
|
|
||||||
|
|
@ -20,11 +21,11 @@ export default async function (eleventyConfig) {
|
||||||
eleventyConfig.addPlugin(pluginWebc);
|
eleventyConfig.addPlugin(pluginWebc);
|
||||||
|
|
||||||
eleventyConfig.setLiquidOptions({
|
eleventyConfig.setLiquidOptions({
|
||||||
// greedy: false,
|
root: [
|
||||||
// trimOutputLeft: true,
|
eleventyConfig.directories.includes,
|
||||||
// trimOutputRight: true,
|
// eleventyConfig.directories.input + '../_includes',
|
||||||
// trimTagLeft: true,
|
fs.realpathSync(path.resolve('./node_modules/hippie/source/view/_includes'))
|
||||||
// trimTagRight : true,
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
eleventyConfig.addGlobalData('permalink', () => {
|
eleventyConfig.addGlobalData('permalink', () => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue