forked from vikunja/theme
Add gulp css hash filename
This commit is contained in:
parent
129b4490cf
commit
b436090c64
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
.idea/
|
||||
node_modules/
|
||||
static/styles/main.css
|
||||
static/styles/main*.css
|
||||
static/styles/main.css.map
|
||||
|
@ -5,6 +5,7 @@ const tar = require('gulp-tar-path');
|
||||
const gzip = require('gulp-gzip');
|
||||
const clean = require('gulp-clean');
|
||||
const cleanCSS = require('gulp-clean-css');
|
||||
const hash = require('gulp-hash-filename');
|
||||
|
||||
const sources = [
|
||||
'archetypes',
|
||||
@ -40,6 +41,7 @@ gulp.task('sass-prod', () => {
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(sass().on('error', sass.logError))
|
||||
.pipe(cleanCSS())
|
||||
.pipe(hash())
|
||||
.pipe(gulp.dest('./static/styles'));
|
||||
})
|
||||
|
||||
|
@ -23,8 +23,10 @@
|
||||
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}styles/main.css">
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}styles/chroma.css">
|
||||
{{ $siteBaseURL := .Site.BaseURL }}
|
||||
{{ range readDir "../../static/styles" }}
|
||||
<link rel="stylesheet" href="{{ $siteBaseURL }}styles/{{ . }}">
|
||||
{{ end }}
|
||||
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{{ .Site.BaseURL }}favicon.ico">
|
||||
<link rel="icon" type="image/x-icon" href="{{ .Site.BaseURL }}favicon.ico">
|
||||
|
@ -21,6 +21,7 @@
|
||||
"gulp-clean": "^0.3.2",
|
||||
"gulp-clean-css": "^4.2.0",
|
||||
"gulp-gzip": "^1.4.0",
|
||||
"gulp-hash-filename": "^2.0.1",
|
||||
"gulp-sass": "^3.1.0",
|
||||
"gulp-sourcemaps": "^1.9.1",
|
||||
"gulp-tar-path": "^1.0.1"
|
||||
|
@ -1097,6 +1097,11 @@ gulp-gzip@^1.4.0:
|
||||
stream-to-array "^2.3.0"
|
||||
through2 "^2.0.3"
|
||||
|
||||
gulp-hash-filename@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/gulp-hash-filename/-/gulp-hash-filename-2.0.1.tgz#c30656261a9b622d636766e48b8297125b4ddde8"
|
||||
integrity sha512-pMg5owb8Dt0wqjgPx/TFbU3c5ckD16rrgo0BTm9PQ3pVC1Zsgw7AYx1+DP2t31JoUTeN1/dPuXNWnCNvN/wj7A==
|
||||
|
||||
gulp-sass@^3.1.0:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/gulp-sass/-/gulp-sass-3.2.1.tgz#2e3688a96fd8be1c0c01340750c191b2e79fab94"
|
||||
|
Loading…
x
Reference in New Issue
Block a user