Closed wimmstr closed 2 years ago
Found a solution. Dont know why it works. Run
"npx @11ty/eleventy --input=src --serve"
I have src definded as my input folder in .eleventy.... Oh frick. I forgot the n in .eleventy.js....
I found the original culprit. At least for me I cant put base.html inside layouts inside _includes. If i put base.html directly into _includes it works without errors.
Found the actual solution... base and home need to be .njk files instead of .html files,
Finally works now. Even in the layouts subfolder.
Ah, I think this is actually your culprit:
in .eleventy.js
, you need to set:
return {
markdownTemplateEngine: 'njk',
dataTemplateEngine: 'njk',
htmlTemplateEngine: 'njk',
dir: {
input: 'src',
output: 'dist'
}
};
That allows html files to run through njk.
From: https://learneleventyfromscratch.com/lesson/3.html#getting-started-with-nunjucks
Thanks for the reply! This was not it though. I had eleventy configuered like this from the beginning.
Problem
After Introducing Extend blocks I am getting errors thrown at me. Im a pretty raw beginner when it comes to this, so I dont even know if this is a right place to ask.Errors I get after Npm start (Npx eleventy --serve):
Also getting Errors from
Then it repeats starting with
Attempted Solutions