-
Notifications
You must be signed in to change notification settings - Fork 102
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
Define semantics for include
directive
#328
Comments
May suggest renaming the Issue? Because this isn't about |
{%include _layouts/menu.liquid %}
should not need indexing by _layouts
include
directive
Ok, went and gave it a more general name
The idea is you have two different kind of partials
My current thought:
This will break compatibility with the current lookup path. Initially, I will submit a lookup that will merge the
My proposal above is a halfway ground. We aren't mixing layouts and layout partials but they are kept near each other. So include "namespace" or directive
So you recommend I like the simplicity of it. I'm also torn because my goal is to encourage a separation of layout and content, I like the idea of distinguishing Hmm, in thinking about this more, if |
Previously, liquid `includes` were processed in the `source` dir. Why change? - Generally, snippets are kept in a central location, making this more cumbersome to access - Jekyll and Hugo have a dedicated directory - We want to support themes having includes and users overriding them, this means their needs to be a virtual file system of some sort - Knowing what files are included allows us to cache off the data read from disk. For now, this optimization has mixed results because `liquid` requires `LiquidOptions` to be cloned for every parse performed. Ideally, we'd keep user snippets and layout snippets separate. On disk, that will happen once we add themes, so punting on it for now for layouts (ad hoc themeing). They are still within the same namespace in the virtual filesystem though. Punting on this for now. This was hand tested to ensure deprecation warnings were issued and to ensure retrofitted tests work. Fixes cobalt-org#328 BREAKING CHANGE: Though we still load files from the old location (and issue a deprecation warning), there is a very small chance that a file already exists in the new location and we'll load that instead.
@gnunicorn pointed this out on gitter.
Prior Art
Jekyll
_includes
folder is flat (include dir/menu.liquid
grabs_includes/dir/menu.liquid
)Hugo
layouts/partials
is the rootThe text was updated successfully, but these errors were encountered: