Permalink
Browse files

Add buildtime to templates to cache bust css

  • Loading branch information...
brew committed May 10, 2017
1 parent 2112948 commit 0849a5856d820be5647bbb3c111dbe019a825672
Showing with 2 additions and 1 deletion.
  1. +1 −1 census/views/base.html
  2. +1 −0 index/generate.js
View
@@ -14,7 +14,7 @@
{% if is_index %}
<link rel="stylesheet" href="//a.okfn.org/html/oki/panel/assets/css/frontend.css"/>
{% endif %}
<link rel="stylesheet" href="/css/styles.css?{{currentTime}}">
<link rel="stylesheet" href="/css/styles.css?v={{currentTime}}">
<style type="text/css">
{{ site.settings.custom_css }}
</style>
View
@@ -188,6 +188,7 @@ if (process.env.BASE_DOMAIN) {
Metalsmith(__dirname)
.use(timer('Start pipeline'))
.metadata({
currentTime: Date.now(),
is_index: true,
// Pass-through str for the moment. Can i18n-abide be used here?
gettext: function(str) {

0 comments on commit 0849a58

Please sign in to comment.