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

Add liquid tags for GZIP generated files #24

Closed
rutger1140 opened this issue Apr 19, 2013 · 2 comments
Closed

Add liquid tags for GZIP generated files #24

rutger1140 opened this issue Apr 19, 2013 · 2 comments

Comments

@rutger1140
Copy link

I love the auto generated gzip functionality for css and js files, but have issues linking to the gzipped version of the file. My site runs on Apache.

On Twitter @ixti suggested to use a filter...

{{ app.js | asset_path | append:".gz" }}

... but a tag like this would be more versatile imo.

{% stylesheet style .gz %}

Good somebody work this out?

Cheers

@ixti
Copy link
Contributor

ixti commented Apr 29, 2013

I tend to close this issue in favor of filters. At least in for of {% asset_path foobar .gz %} it seems to add more confusions than solutions. The only acceptable syntax I see is:

{% stylesheet app gzip:true %}

If there would be more requests, or a good use case (I don't see a lot of profit having this as part of the core feature) I'll consider implementing this.

@rutger1140
Copy link
Author

Good point. My idea was to get gzipped files running with Amazon Cloudfront, but in the end I could not get it working in a nice workflow. For Amazon AWS/S3 to work, the proper headers need to be set on each file upload separately, whereas nginx/Apache can handle that with a global config, which is way more easy.

Using nginx with success now. Thanks for looking into it.

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