-
-
Notifications
You must be signed in to change notification settings - Fork 493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check if includes
dir is relative to current dir or input
dir
#67
Comments
The following image from #60 illustrates it best: |
In the future, will it be possible to have the include directory reside outside of the input directory? |
Hmm, this is a good question. This will lead to some guessing which would cause some weird edge-cases, I think. If I kinda wish I had made it work root-relative from the start, but here we are. |
Maybe you can get input/data on what current users prefer? It should be possible to somehow transition to root-relative In the example you provided, where both |
This repository is now using lodash style issue management for enhancements (see https://twitter.com/samselikoff/status/991395669016436736) This means enhancement issues will now be closed instead of leaving them open. The enhancement backlog can be found here: https://github.com/11ty/eleventy/issues?utf8=%E2%9C%93&q=label%3Aneeds-votes+sort%3Areactions-%2B1-desc+ |
I don't know if this is bad practice for static site generators, but I want to be able to include any I'm trying to create a simple component library/style guide, and forcing an What I'd like:
Correct me if I'm wrong, but I think what I have to do with the current setup is build the page structure inside of Unless I'm missing something? Upvoting issue. |
Actually appears if I leave set
Hopefully this isn't a mortal sin or something? It was confusing as hell to figure out, it would have made more sense to me if includes was from the root, or if includes took |
I would love to have that option. Currently I have: .
├── layouts/
│ └── …
├── partials/
│ └── …
├── mixins/
│ └── …
├── static/
| # thanks to #452, these no longer have to be in the root
| ├── css/
| ├── js/
| └── …
# pages and collections in the root :(
├── committees/
├── …
├── index.pug
├── …
├── sitemap.xml.pug
└── updates.md
# and of course, config etc files
├── now.json
├── package.json
└── … But I don't want to have all pages and collections in the root directory alongside dotfiles and other config files. I want them all to be in a directory of their own at the same level as .
├── layouts/
│ └── …
├── partials/ # includes
│ └── …
├── mixins/
│ └── …
├── static/
| # thanks to #452, these no longer have to be in the root
| ├── css/
| ├── js/
| └── …
# pages and collections neatly tucked away in a dir of their own 🚀
├── pages/
| ├── committees/
| ├── …
| ├── index.pug
| ├── …
| ├── sitemap.xml.pug
| └── updates.md
# and of course, config etc files
├── now.json
├── package.json
└── readme.md Should this be an issue of its own? |
After a long time not building websites I just tried using Eleventy. The need for nested includes instantly confused me and ultimately resulted in a very messy structure with content files living alongside layout files. A big upvote here for dropping the need for Still love it all though! ❤️ |
To be clear here (much later)—using dir: {
input: "content",
includes: "../includes"
} Works with (at the same level):
|
What about adding a new |
(moving back to the enhancement queue) |
Currently is relative to
input
directory, which is confusing. See #60.It’s unlikely we’ll be able to wholesale change this, but we can at least check to see if the directory exists before we choose.
The text was updated successfully, but these errors were encountered: