Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] unique files names #235

Open
kwladyka opened this issue Jun 9, 2021 · 1 comment
Open

[feature] unique files names #235

kwladyka opened this issue Jun 9, 2021 · 1 comment

Comments

@kwladyka
Copy link

kwladyka commented Jun 9, 2021

Unique files names for css / js etc.

For example in Hugo {{- $style := resources.Get "sass/main.scss" | toCSS | minify | fingerprint -}} make from scss file, but named main.min.e56b0f76143debd6df3cb44954ca9b65bf06439fee332c88f655980b7a15b5a7.css instead of "main.css". The hash is used.

This is expected result, but of course it need to be done in Selmer way.

Why? Issues with refresh files in web browser after update.

@kwladyka kwladyka changed the title [feature] unique files name [feature] unique files names Jun 9, 2021
@holyjak
Copy link
Contributor

holyjak commented Oct 5, 2021

Hi @kwladyka ! That sounds as a good idea. I guess somewhere around https://github.com/cryogen-project/cryogen-core/blob/8318bde771d39515b5f5a7f5af53ba5c55aeec35/src/cryogen_core/compiler.clj#L663 we could add code that computes the fingerprints, renames the files to include those, and creates a map original name -> fingerprinted name that can then be used from Selmer templates to get the correct file name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants