tommi, (edited ) Hey #Eleventy tinkerers!
I have a git submodule that I am adding inside the repository of my website, but I want it to be ignored, except for its
README.md
.I have tried two different approaches. In both cases I am able to exclude the git submodule, but I can’t find a way to include the README and use it as a regular template.
Option 1: using
.eleventyignore
inputdir/submodule<br></br>!inputdir/submodule/README.md<br></br>
Option 2: using
.eleventy.js
module.exports = function (eleventyConfig) {<br></br> eleventyConfig.ignores.add('inputdir/submodule');<br></br> eleventyConfig.ignores.add('inputdir/submodule/README.md'); // added it first to be sure<br></br> eleventyConfig.ignores.delete('inputdir/submodule/README.md');<br></br>};<br></br>
Do you have any suggestions to fix this? The ignore section in Eleventy’s documentation is not helping much…
Thanks a lot!
#11ty #help #WebDev #JavaScript #gitignore
cc: @eleventy @
(https://discord.com/channels/741017160297611315/1022195881698672650/threads/1233153676416254133 and on GitHub Discussions
Add comment