I actually have a question wrt. cache busting in this situation. Yes, mix will digest those files and add tagged versions, however, if my css (untouched by mix anyway) is still referencing the plain images/blue.png
, how exactly does the cache busting work then?
The digested css gets built with the digested image/font/etc. paths (I actually had to go verify this manually for myself because I had the same question)
EDIT: To be clear, I am saying that if you run mix phx.digest
and in your templates you are using the static_path(...)
helper, then you are serving the digested app-[hash].css
file, and that file has url()
paths that point to the other digested assets: (images/blue-[hash].png
)
Do you mean mix phx.digest
will mung the content of the css, by expanding a macro like url(...)
? Where is this documented? I want to know more.
Check the source for Phoenix.Digester
– that is what is invoked when you run mix phx.digest
.