posativ / acrylamid

(unmaintained) static blog generator in python with incremental rendering ⛺
http://posativ.org/acrylamid/
Other
277 stars 40 forks source link

Use Jinja2 extensions for assets #208

Closed jrast closed 10 years ago

jrast commented 10 years ago

Use the extension provided by webassets to include/compile/compress assets.

If you can give me some hints on where to begin with I'm willing to implement this.

See http://elsdoerfer.name/docs/webassets/integration/jinja2.html

posativ commented 10 years ago

I've already integrated webassets in the master branch, but there are a few remaining issues (unrelated to webassets integration), which hold a new PyPi release back.

See http://posativ.org/~tmp/acrylamid/assets.html#webassets-integration for details.

jrast commented 10 years ago

Oh nice! But why don't you use the extension provided by webassets.ext.jinja2? Are there any drawbacks?

posativ commented 10 years ago

Yes, if the assets change, but not the template, Webasset won't recompile, because the compilation step is inside the templates (Acrylamid does incremental rendering, that also means: don't render unchanged stuff). I wrote a custom integration that builds with both Jinja2 and Mako and handles the stuff defer the changed state from assets to the template (and also added some code for dependency management not yet available in Webassets).

jrast commented 10 years ago

ok, seems legit. Then I only have to wait for the 0.8 release.

posativ commented 10 years ago

I have barely time to finish the 0.8 release, just try it. A few things are missing (e.g. the initialization step). I recommend to setup your blog with 0.7.x and then upgrade to the master branch.

jrast commented 10 years ago

I have done it exactly this way. Just updated the current version with the master branch without any problems.