THoenig / 11ty-bs5-starter

Minimal 11ty starter with Bootstrap 5 and Parcel
MIT License
20 stars 14 forks source link

how to process .html templates #3

Open nigelwhite opened 3 years ago

nigelwhite commented 3 years ago

Thanks for this starter. It almost got me started...

I find I can't process .html templates. I want to write my templates in html so that prettier will format my code in vscode. [I did try configuring vscode to prettify .njk as .html, but that defeated me]

Please could you suggest additions to eleventy.js that would allow processing of .html templates?

I tried adding .html to your list of config.setTemplateFormats but that didn't help.

Thank you

nigelwhite commented 3 years ago

For anyone struggling with this, I found a way. Turns out that VScode has a language toggler in the bottom menu bar. You can toggle back and forth between different language formats.

Described here

To set VScode so that it defaults to html format for all .njk files, click on the current format in the bottom status bar (will say nunjacks HTML or something). In the menu that pops up select Configure file association for .njk. Pick HTML