website: detect query string when adding HTTP caching

Related to 89affa49fe.
Closes #639, #691, #697.
This commit is contained in:
Thaddee Tyl 2016-04-26 09:45:00 +02:00
parent fde90a51ee
commit 08d3be0a28
2 changed files with 16 additions and 15 deletions

View File

@ -4,10 +4,11 @@ favicon:
node gh-badge.js '' '' '#bada55' .png > favicon.png
website:
cat try.html | sed "s,\(<img src='\)\(/[^']\+\)',\1https://img.shields.io\2?maxAge=2592000'," \
| sed "s,<span id='imgUrlPrefix'>,&https://img.shields.io," \
| sed "s,var origin = '';,var origin = 'https://img.shields.io';," \
| sed "s,<style>,<!-- WARNING: THIS FILE WAS GENERATED FROM try.html -->\n<style>," > index.html
cat try.html | sed "s,\(<img src='\)\(/[^'\?]\+\)',\1https://img.shields.io\2?maxAge=2592000'," \
| sed "s,\(<img src='\)\(/[^'\?]\+\?[^']\+\)',\1https://img.shields.io\2\&maxAge=2592000'," \
| sed "s,<span id='imgUrlPrefix'>,&https://img.shields.io," \
| sed "s,var origin = '';,var origin = 'https://img.shields.io';," \
| sed "s,<style>,<!-- WARNING: THIS FILE WAS GENERATED FROM try.html -->\n<style>," > index.html
deploy: deploy-s0 deploy-s1 deploy-gh-pages

View File

@ -540,27 +540,27 @@ Pixel-perfect &nbsp; Retina-ready &nbsp; Fast &nbsp; Consistent &nbsp; Hackable
<h3 id="social"> Social </h3>
<table class='badge'><tbody>
<tr><th> GitHub forks: </th>
<td><img src='https://img.shields.io/github/forks/badges/shields.svg?style=social&label=Fork?maxAge=2592000' alt=''/></td>
<td><img src='https://img.shields.io/github/forks/badges/shields.svg?style=social&label=Fork&maxAge=2592000' alt=''/></td>
<td><code>https://img.shields.io/github/forks/badges/shields.svg?style=social&amp;label=Fork</code></td>
</tr>
<tr><th> GitHub stars: </th>
<td><img src='https://img.shields.io/github/stars/badges/shields.svg?style=social&label=Star?maxAge=2592000' alt=''/></td>
<td><img src='https://img.shields.io/github/stars/badges/shields.svg?style=social&label=Star&maxAge=2592000' alt=''/></td>
<td><code>https://img.shields.io/github/stars/badges/shields.svg?style=social&amp;label=Star</code></td>
</tr>
<tr><th> GitHub watchers: </th>
<td><img src='https://img.shields.io/github/watchers/badges/shields.svg?style=social&label=Watch?maxAge=2592000' alt=''/></td>
<td><img src='https://img.shields.io/github/watchers/badges/shields.svg?style=social&label=Watch&maxAge=2592000' alt=''/></td>
<td><code>https://img.shields.io/github/watchers/badges/shields.svg?style=social&amp;label=Watch</code></td>
</tr>
<tr><th> GitHub followers: </th>
<td><img src='https://img.shields.io/github/followers/espadrine.svg?style=social&label=Follow?maxAge=2592000' alt=''/></td>
<td><img src='https://img.shields.io/github/followers/espadrine.svg?style=social&label=Follow&maxAge=2592000' alt=''/></td>
<td><code>https://img.shields.io/github/followers/espadrine.svg?style=social&amp;label=Follow</code></td>
</tr>
<tr><th> Twitter URL: </th>
<td><img src='https://img.shields.io/twitter/url/http/shields.io.svg?style=social?maxAge=2592000' alt=''/></td>
<td><img src='https://img.shields.io/twitter/url/http/shields.io.svg?style=social&maxAge=2592000' alt=''/></td>
<td><code>https://img.shields.io/twitter/url/http/shields.io.svg?style=social</code></td>
</tr>
<tr><th> Twitter Follow: </th>
<td><img src='https://img.shields.io/twitter/follow/shields_io.svg?style=social?maxAge=2592000' alt=''/></td>
<td><img src='https://img.shields.io/twitter/follow/shields_io.svg?style=social&maxAge=2592000' alt=''/></td>
<td><code>https://img.shields.io/twitter/follow/shields_io.svg?style=social</code></td>
</tr>
<tr><th data-keywords='aur'> AUR: </th>
@ -912,19 +912,19 @@ The following styles are available (flat is the default as of Feb 1st 2015):
</p>
<table><tbody>
<tr>
<td><img src='https://img.shields.io/badge/style-plastic-green.svg?style=plastic?maxAge=2592000' alt=''/></td>
<td><img src='https://img.shields.io/badge/style-plastic-green.svg?style=plastic&maxAge=2592000' alt=''/></td>
<td><code>https://img.shields.io/badge/style-plastic-green.svg?style=plastic</code></td>
</tr>
<tr>
<td><img src='https://img.shields.io/badge/style-flat-green.svg?style=flat?maxAge=2592000' alt=''/></td>
<td><img src='https://img.shields.io/badge/style-flat-green.svg?style=flat&maxAge=2592000' alt=''/></td>
<td><code>https://img.shields.io/badge/style-flat-green.svg?style=flat</code></td>
</tr>
<tr>
<td><img src='https://img.shields.io/badge/style-flat--squared-green.svg?style=flat-square?maxAge=2592000' alt=''/></td>
<td><img src='https://img.shields.io/badge/style-flat--squared-green.svg?style=flat-square&maxAge=2592000' alt=''/></td>
<td><code>https://img.shields.io/badge/style-flat--squared-green.svg?style=flat-square</code></td>
</tr>
<tr>
<td><img src='https://img.shields.io/badge/style-social-green.svg?style=social?maxAge=2592000' alt=''/></td>
<td><img src='https://img.shields.io/badge/style-social-green.svg?style=social&maxAge=2592000' alt=''/></td>
<td><code>https://img.shields.io/badge/style-social-green.svg?style=social</code></td>
</tr>
</tbody></table>
@ -961,7 +961,7 @@ And tell us, we might be able to bring it to you anyway!
<a href="https://twitter.com/Shields_io" class="twitter-follow-button"
data-show-count="false">Follow @Shields_io</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<a href='https://www.gratipay.com/Shields/'><img src='https://img.shields.io/gratipay/Shields.svg?style=social&label=Donate?maxAge=2592000' alt='Donate to us!'/></a>
<a href='https://www.gratipay.com/Shields/'><img src='https://img.shields.io/gratipay/Shields.svg?style=social&label=Donate&maxAge=2592000' alt='Donate to us!'/></a>
<iframe src="http://ghbtns.com/github-btn.html?user=badges&amp;repo=shields&amp;type=fork&amp;count=true"
style="border:0; background-color:transparent"
width="95" height="20"></iframe>