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

Create a cache-busted file + regular one. #19

Closed
eddanger opened this issue Mar 8, 2013 · 3 comments
Closed

Create a cache-busted file + regular one. #19

eddanger opened this issue Mar 8, 2013 · 3 comments

Comments

@eddanger
Copy link

eddanger commented Mar 8, 2013

It would be great if there was an option to generate both a regular asset and a cache-busted asset.

I'm using my site programatically and I need to know the location of particular assets beforehand.

I could set cachebust to none and be done with it, but I like cache bustin'.

@ixti
Copy link
Contributor

ixti commented Mar 13, 2013

Can you please explain in details what exactly do you want to achieve? If you want to have a map of "logical name" (e.g. app.css) to "digest path" (e.g. app-14758f1afd44c09b7992073ccf00b43d.css) then I think it's better to add a manifest.json file (core feature of Sprockets) that will contain desired map.

@eddanger
Copy link
Author

Hi Aleksey,

I simply want to generate two files, one digest version (when cachebust is set to hard) and one regular non-digest version in a predictable location such as /assets

The non-digest assets will be used by an external site not compiled with Jekyll.

I've hacked my sites to create the non-digest assets by using the Liquid tag asset as the only thing in the file. This works for now, but would like a more permanent method to always generate non-digested assets along with digested ones.

@ixti
Copy link
Contributor

ixti commented Apr 29, 2013

After some thinking (OK it was 2 months of thinking, sorry) I tend to close this issue. I don't see this feature as part of the plugin core. To avoid kludges with empty file, you can add small one-liner into the site building pipeline (task):

find assets -type f | grep -v '\.gz$' | while read f; do cp $f $(echo $f | sed -r 's/-[a-f0-9]{32}(\.[^.]+)$/\1/'); done

@ixti ixti closed this as completed Apr 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants