sveetch / Optimus

A simple building environment to produce static HTML from Jinja2 templates and with assets compress managing with webassets.
https://optimus.readthedocs.io/
MIT License
3 stars 3 forks source link

Add templatetags for site and static url #33

Open sveetch opened 4 years ago

sveetch commented 4 years ago

Alike {% static "foo.png" %} from Django

sveetch commented 3 months ago

This may be an occasion to drop webassets because it is an abandoned package since ~2020, it will probably cause issues in further Python version.

Since we introduced a Node.js frontend management in a (yet to be) cookiecutter for bootstrap5 and there is not any Python package to replace webassets, we should definitively drop the asset optimization. Users will either use a modern asset bundler if needed or just don't care.

However the template needs a way to locate assets, a {% assets ... %} templatetag would be a good way to drop the webassets tags and dependency. The tag should read available assets from one or many manifest files. (The webpack bundler manifest is not enough because we don't want to rely only on webpack).