Closed andreamoro closed 9 years ago
Done, needs testing though. You can't use multiple directories if you use webassets (only the first is honored). To add multiple directory, write something like
THEME = ['foo', 'bar']
to your conf.py
.
Not sure why the webassets doesn't work. Having a second theme folder, I believe can make this a bit confusing? How am I supposed to "import" files in this way? An example could be great to start the testing, as well as some instructions on how to upgrade (would a pip acrylamid update suffice)?
Thanks Andrea
Webassets only supports a single root folder and I didn't have the time to circumvent this limitation. Webassets still work (I specifically mean this feature: http://posativ.org/~tmp/acrylamid/assets.html#webassets-integration), but only for the first theme directory.
You can upgrade Acrylamid via pip:
$ pip install -U https://github.com/posativ/acrylamid/archive/master.zip
This seems to work, but as an unexpected behavior all the files in the second theme are copied in the output folder.
That is always the case, if a template is not used. You can ignore certain files to be copied to the output folder, though.
Jinja2 API allows multiple locations to be passed to the loader, thus allowing templates to be also in folder different than the "theme" one (which has been set as a default).
This can be extremely useful to import one or more files whose "static" content should be edited from the "web site editor" and sit in a different folder than the theme one. By allowing the inclusion of a file in the content folder, it would be possible to achieve the complete abstraction between the theme and the content itself (though this means sacrifice the versioning).
To implement this feature, something like this is required
To make the feature more scalable, a global variable can be included thus allowing the end user to specify any local path.