Add prefix option to asset_hash (#1949)
This allows manually changing the filename so that fiel header changes can be reflected on the CDN. E.g. if you turn on crossOrigin serving (CORS) the asset hash doesn't change, but the CDN cache needs to be broken in order to pickup the new header.
This commit is contained in:
parent
ea39d16d81
commit
389e3f5a8c
8 changed files with 65 additions and 1 deletions
|
@ -0,0 +1,6 @@
|
|||
<% content_for :head do %>
|
||||
<title>The Middleman!</title>
|
||||
<% end %>
|
||||
|
||||
<h1>Testing the sitemap hashing</h1>
|
||||
<br /><br /><br />
|
|
@ -0,0 +1,2 @@
|
|||
function foo(){var message="HEY THERE FRIEND!";var para=document.createElement("p");para.innerHTML=message;var body=document.getElementsByTagName("body")[0];body.insertBefore(para,body.firstChild)}window.onload=foo;
|
||||
//# sourceMappingURL=application.js.map
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sources":["source/javascripts/application.js"],"names":["foo","message","para","document","createElement","innerHTML","body","getElementsByTagName","insertBefore","firstChild","window","onload"],"mappings":"AAAA,QAASA,OACP,GAAIC,SAAU,mBACd,IAAIC,MAAOC,SAASC,cAAc,IAClCF,MAAKG,UAAYJ,OACb,IAAIK,MAAOH,SAASI,qBAAqB,QAAQ,EAC/CD,MAAKE,aAAaN,KAAMI,KAAKG,YAGpCC,OAAOC,OAASX"}
|
17
middleman-core/fixtures/asset-hash-prefix/source/layout.erb
Normal file
17
middleman-core/fixtures/asset-hash-prefix/source/layout.erb
Normal file
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<%= javascript_include_tag "application" %>
|
||||
<%= yield_content :head %>
|
||||
</head>
|
||||
|
||||
<body class="<%= page_classes %>">
|
||||
|
||||
<div id="main" role="main">
|
||||
<%= yield %>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue