tommi, (edited ) to 11ty
@tommi@pan.rent avatar

Hey 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!

cc: @eleventy @

(https://discord.com/channels/741017160297611315/1022195881698672650/threads/1233153676416254133 and on GitHub Discussions

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • rosin
  • Durango
  • cisconetworking
  • mdbf
  • InstantRegret
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • osvaldo12
  • Youngstown
  • ethstaker
  • slotface
  • kavyap
  • JUstTest
  • thenastyranch
  • normalnudes
  • modclub
  • khanakhh
  • everett
  • tacticalgear
  • cubers
  • GTA5RPClips
  • anitta
  • Leos
  • tester
  • provamag3
  • lostlight
  • All magazines