posativ / acrylamid

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

webassets integration (provides SCSS, LESS etc. and asset versioning) #149

Closed posativ closed 10 years ago

posativ commented 11 years ago

I would like to introduce a new way to describe assets such as SASS, LESS and every other language webassets supports:

{% for url in compile('style.scss', filters="scss,gzip", output="style.%(version)s.css",
                                    depends=["scss/*.css", "scss/*.scss"]) %}
    <link media="all" href="{{ url }}" rel="stylesheet" />
{% endfor %}

This will compile the master theme/style.scss file using SCSS to the specified output (the %(version).s is a placeholder for the version hash). Use the depends keyword to watch additional files for changes (the import clause within a stylesheet does not work yet).

Currently only working for Python 2.6 and 2.7 (Webassets is not yet compatible with Python 3 but they are working on this) and Jinja2. You can check out the feature/webassets branch if you like.

posativ commented 10 years ago

Done.