Skip to content

Static files framework and processors #124

@m4tx

Description

@m4tx

Static files are a bit lacking at the moment:

  1. There's no way to change the URL they static files are available at - it's always /static/ fixed in feat(static-files)!: refactor, add config and content hashing #317
  2. There's no easy way to get a URL to a static file in templates, so you must hardcode /static/images/image.png and you never get any information (apart from a web browser not display the image, for instance) that the file doesn't exist. There should be some kind of {% static %} template tag or some other way to get a URL to a static file that would also check if it exists fixed in feat(static-files)!: refactor, add config and content hashing #317 - we have static_files.url_for now
  3. This cannot be solved without solving the above bullet point first: there is no mechanism to include hash or some other identifying number to the filename automatically. It's therefore difficult to set up an effective cache for the static files, as their filenames remain the same after modifying. fixed in feat(static-files)!: refactor, add config and content hashing #317
  4. If you have some files that require some pre-processing (like SCSS files that you need to compile, or JavaScript files that require minifying) you have to do it either manually, in build.rs file, via proc macros, or dynamically at runtime. It would be nice to have some sort of "processors" or "engines" that could be wired up easily and that would do all that stuff for you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions