diff --git a/.drone.yml b/.drone.yml index 6546230..ec74f30 100644 --- a/.drone.yml +++ b/.drone.yml @@ -60,6 +60,18 @@ steps: - failure - success +- name: page-validation-link + image: thegeeklab/drone-github-comment + settings: + api_key: + from_secret: github_token + key: pr-${DRONE_PULL_REQUEST} + message: lhci_reports/dist/summary.md + update: true + when: + ref: + - refs/pull/** + trigger: ref: - refs/heads/master @@ -230,6 +242,6 @@ depends_on: --- kind: signature -hmac: 16fef8d3e0cba7202aa533623d9ec7bf8bd3b645aed4c488b9080667f02fa366 +hmac: 9ffa1706ed0a3368bafa619e2fe5dd07db1813c9c8f9e7b54a3f4e722393ffce ... diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fc2948..731af10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,16 @@ - improve and normalize microblog formatting - add font and css preloading links - add node `gulp` script to package.json (@AgentEnder) + - add minimal working css for printing + - split out mobile css + - load static css/js assets from data template: + This way users can hash static assets and overwrite the data template + to deliver the hashed assets. Thats helpful if you have to deal with + long cache settings but wont to ensure your updated assets are delivered + to clients. - BUGFIX - use relative URL's for fonts (@atorrescogollo) - OTHER - fix typos (@weidenhaus) +- INTERNAL + - publish Lighthouse CI overwiew to PR's diff --git a/data/assets.json b/data/assets.json new file mode 100644 index 0000000..20a527d --- /dev/null +++ b/data/assets.json @@ -0,0 +1,8 @@ +{ + "main.min.css": "main.min.css", + "mobile.min.css": "mobile.min.css", + "print.min.css": "print.min.css", + "custom.css": "custom.css", + "js/clipboard.min.js": "js/clipboard.min.js", + "js/mermaid.min.js": "js/mermaid.min.js" +} diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 6540b1e..bbdf118 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -4,6 +4,7 @@ title: Geekdocs theme: hugo-geekdoc pygmentsUseClasses: true pygmentsCodeFences: true +timeout: 180000 # Geekdoc configuration disablePathToLower: true diff --git a/gulpfile.js b/gulpfile.js index cb7e3d9..5ab5c0a 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -12,12 +12,12 @@ const fs = require("fs"); const svgSprite = require("gulp-svg-sprite"); var CSSDEST = "static/"; -var FAVICON_DATA_FILE = "src/favicon/faviconData.json"; +var FAVICON_DATA_FILE = "tmp/faviconData.json"; var TIMESTAMP = Math.round(Date.now() / 1000); gulp.task("sass", function () { return gulp - .src("src/sass/main.scss") + .src("src/sass/{main,print,mobile}.scss") .pipe(sass({ errLogToConsole: true })) .pipe(cleanCSS({ format: "beautify" })) .pipe( @@ -36,11 +36,11 @@ gulp.task("favicon-generate", function (done) { { masterPicture: "src/favicon/favicon-master.svg", dest: "static/favicon", - iconsPath: "/", + iconsPath: "/favicon", design: { ios: { pictureAspect: "backgroundAndMargin", - backgroundColor: "#ffffff", + backgroundColor: "#2f333e", margin: "14%", assets: { ios6AndPriorIcons: false, @@ -52,7 +52,7 @@ gulp.task("favicon-generate", function (done) { desktopBrowser: {}, windows: { pictureAspect: "whiteSilhouette", - backgroundColor: "#2b5797", + backgroundColor: "#2f333e", onConflict: "override", assets: { windows80Ie10Tile: false, @@ -66,7 +66,7 @@ gulp.task("favicon-generate", function (done) { }, androidChrome: { pictureAspect: "shadow", - themeColor: "#ffffff", + themeColor: "#2f333e", manifest: { display: "standalone", orientation: "notSet", @@ -79,9 +79,8 @@ gulp.task("favicon-generate", function (done) { }, }, safariPinnedTab: { - pictureAspect: "blackAndWhite", - threshold: 74.21875, - themeColor: "#5bbad5", + pictureAspect: "silhouette", + themeColor: "#2f333e", }, }, settings: { @@ -111,6 +110,18 @@ gulp.task("favicon-check-update", function (done) { gulp.task("svg-sprite", function () { config = { + shape: { + dimension: { + maxWidth: 24, + maxHeight: 24, + attributes: false, + }, + spacing: { + padding: 0, + box: "content", + }, + dest: "tmp/intermediate-svg", + }, svg: { xmlDeclaration: false, rootAttributes: { @@ -120,7 +131,7 @@ gulp.task("svg-sprite", function () { mode: { inline: true, symbol: { - dest: "./", + dest: "layouts/partials/", sprite: "svg-icon-symbols.html", bust: false, }, @@ -130,7 +141,7 @@ gulp.task("svg-sprite", function () { return gulp .src("src/icons/*.svg") .pipe(svgSprite(config)) - .pipe(gulp.dest("layouts/partials/")); + .pipe(gulp.dest(".")); }); gulp.task("iconfont", function () { @@ -172,13 +183,7 @@ gulp.task("iconfont", function () { gulp.task( "default", - gulp.series( - "sass", - "svg-sprite", - "iconfont", - "favicon-check-update", - "favicon-generate" - ) + gulp.series("sass", "svg-sprite", "iconfont", "favicon-generate") ); gulp.task("devel", function () { diff --git a/layouts/partials/foot.html b/layouts/partials/foot.html index 5805bbb..bbb9e3f 100644 --- a/layouts/partials/foot.html +++ b/layouts/partials/foot.html @@ -2,12 +2,12 @@ {{ .Scratch.Set "geekdocSearchConfig" .Site.Params.GeekdocSearchConfig }} {{ $searchJSFile := printf "js/%s.search.js" .Language.Lang }} -{{ $searchJS := resources.Get "js/search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify }} +{{ $searchJS := resources.Get "js/search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify | fingerprint }} {{ end }} {{ if default true .Site.Params.GeekdocAnchorCopy }} - + +