Closed gvwilson closed 2 years ago
Hi Greg. I'm not sure I understand the use case -- could you give me an example?
I am trying to build a theme that I can use across several sites. I can do what I want with template inheritance, but it feels very contrived: it would be a lot easier to have:
<!DOCTYPE html lang="en">
<html>
<head>
{% include mathjax %}
{% include plausible %}
...template-specific stuff...
</head>
...
in several places - putting those files in the inc
directory of the project rather than in lib/whatever/inc
feels leaky.
You should be able to put files like that directly into the theme's templates
directory -- that's where Jinja and Ibis are configured to look for files included using the {% include %}
tag.
Thanks, that seems to work.
Excellent. I've updated the documentation to hopefully make that clearer for future users.
Is there a way to put include files in themes, e.g.,
lib/whatever/inc
? I have several snippets that are shared between templates, and including them in the template directory rather that in the rootinc
directory seems more portable. thx - Greg