11ty / eleventy-base-blog

A starter repository for a blog web site using the Eleventy static site generator.

Home Page:https://eleventy-base-blog.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Separate source subdirectory within root?

switch-to-gitlab opened this issue · comments

I got tripped up by the directory structure.

This happened because I was npm installing a package that had a README.md into a scripts/ folder I was passing through. I figure this is a fairly common use case.

If I submitted a PR that put the source into a subdirectory, would you accept?

Ah I think it would be more straightforward to add an ignore for node_modules directories right? Probably in .eleventyignore

@zachleat If I understand correctly, that would prevent the node_modules folder from being included in the output site entirely, right?

I need node_modules to be there because it contains runtime dependencies of my scripts, so I need it to be passed through, but without any additional processing by eleventy.

Ah perhaps not-obviously .eleventyignore only applies to the file extension search from templateFormats (not manual passthrough copy files, e.g. addPassthroughCopy method). Specifically step #1 in the order of operations: https://www.11ty.dev/docs/advanced-order/

Also worth noting here that 11ty/eleventy#383 changed the default behavior in 1.0 to always ignore root node_modules/**

This is an automated message to let you know that a helpful response was posted to your issue and for the health of the repository issue tracker the issue will be closed. This is to help alleviate issues hanging open waiting for a response from the original poster.

If the response works to solve your problem—great! But if you’re still having problems, do not let the issue’s closing deter you if you have additional questions! Post another comment and we will reopen the issue. Thanks!