How to pass template engine options?
See original GitHub issueIām trying to use eleventy with pug and would like to pass custom render options. Iām asking this because I canāt even make it work, as Iād like to use includes with relative paths. Pug throws me this error:
Error: the "filename" option is required to use includes and extends with "relative" paths
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Using template engines with Express
Express-compliant template engines such as Jade and Pug export a function named __express(filePath, options, callback) , which is called by the res.render()Ā ...
Read more >How to pass options into Express template engine?
How to pass options into Express template engine? Ā· Try :: app.set('view engine', 'ejs'); app.locals.async = true; Ā· @ÅivÄSankÄr Hmm. ThatĀ ...
Read more >Top Express.js template engines for dynamic HTML pages
There are a number of template engines available today, and the more popular ones include Pug (fka Jade), Handlebars, EJS, Mustache, Swig, andĀ ......
Read more >Understanding Express Template Engines | DigitalOcean
A brief introduction into various template engines you can use in Node.js and Express. We'll go over Pug, EJS and Mustache.
Read more >Using EJS Template Engine With Express.js - Topcoder
Template Engines and EJS: Ā· Setting up a project Ā· Configuring server.js to use EJS Ā· Creating EJS partials Ā· Using partials in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This will be included with Eleventy 0.2.15! Support and tests added š
New Pug features are docād here: https://github.com/11ty/eleventy/#template-engine-features allows you to configure any pug compile/render options you want.
@kleinfreund Sure, I might even say it wasnāt clear enough for me on how to structure my project and how to use includes and extends properly.
Hereās my project structure:
This is my .eleventy.js file:
And I have a
include section-card.pug
inside the section-about.pug file for example.The relevant error lines eleventy throws me back are: