Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit aad083d

Browse files
authored
Merge pull request #2611 from liqd/2016-08-tb-iconfont-cachebust-2
restore cache busting for font-url
2 parents e1fd191 + 14c7a0c commit aad083d

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/adhocracy_frontend/adhocracy_frontend/static/stylesheets/scss/general/_mixins.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@ $rem-px-only: false !default;
6262
}
6363

6464
@function font-url($path) {
65-
@return url("../fonts/" + $path);
65+
@return url("../fonts/" + $path + "?" + cachebust());
6666
}

src/adhocracy_frontend/checkcode_and_compile.cfg

+9-1
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ inline =
164164
"grunt-htmlhint": "0.9.12-fix",
165165
"mailparser": "0.5.3",
166166
"ini": "1.3.4",
167+
"node-sass": "3.8.0",
167168
"grunt-sass": "1.1.0",
168169
"grunt-sass-lint": "0.2.0"
169170
}
@@ -313,6 +314,8 @@ update-command = ${javascript:command}
313314
[gruntfile]
314315
recipe = collective.recipe.template
315316
inline =
317+
var sass = require("node-sass");
318+
316319
module.exports = function(grunt) {
317320
grunt.initConfig({
318321
ngtemplates: {
@@ -388,7 +391,12 @@ inline =
388391
sass: {
389392
options: {
390393
sourceMap: true,
391-
outputStyle: "compressed"
394+
outputStyle: "compressed",
395+
functions: {
396+
"cachebust": function() {
397+
return new sass.types.String("" + Date.now());
398+
}
399+
}
392400
},
393401
dist: {
394402
files: {

0 commit comments

Comments
 (0)