diff --git a/.github/settings.yml b/.github/settings.yml
index 2a9c0cf..ca95189 100644
--- a/.github/settings.yml
+++ b/.github/settings.yml
@@ -57,5 +57,3 @@ branches:
restrictions:
users: []
teams: []
-
-...
diff --git a/.prettierignore b/.prettierignore
index 0df6830..8b16bf8 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -2,6 +2,7 @@
.drone.yml
search*.js
_normalize.css
+list.json.json
.lighthouseci/
themes/
static/js/
diff --git a/exampleSite/archetypes/default.md b/exampleSite/archetypes/default.md
index 00e77bd..26f317f 100644
--- a/exampleSite/archetypes/default.md
+++ b/exampleSite/archetypes/default.md
@@ -3,4 +3,3 @@ title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---
-
diff --git a/exampleSite/content/posts/emojies.md b/exampleSite/content/posts/emojies.md
index 2065a02..3c26318 100644
--- a/exampleSite/content/posts/emojies.md
+++ b/exampleSite/content/posts/emojies.md
@@ -17,9 +17,11 @@ To enable emoji globally, set `enableEmoji` to `true` in your site's [configurat
+
{{< emojify ":see_no_evil:" >}} :see_no_evil:
{{< emojify ":hear_no_evil:" >}} :hear_no_evil:
{{< emojify ":speak_no_evil:" >}} :speak_no_evil:
+
@@ -33,9 +35,11 @@ The above steps enable Unicode Standard emoji characters and sequences in Hugo,
**Example:**
+
{{< highlight html "linenos=table" >}}
.emoji {
font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
}
{{< /highlight >}}
+
diff --git a/exampleSite/content/posts/getting-started.md b/exampleSite/content/posts/getting-started.md
index 023f676..83577ab 100644
--- a/exampleSite/content/posts/getting-started.md
+++ b/exampleSite/content/posts/getting-started.md
@@ -66,9 +66,9 @@ To prepare your new site environment just a few steps are required:
cd demosite
```
-3. Install the Geekblog theme from a [release bundle](#option-1-download-pre-build-release) (recommended) or form [Git branch](#option-2-clone-the-github-repository).
+3. Install the Geekblog theme from a [release bundle](#option-1-download-pre-build-release-bundle) (recommended) or form [Git branch](#option-2-clone-the-github-repository).
-4. Create the minimal required Hugo configuration `config.toml`. For all configuration options see [here](/usage/configuration/).
+4. Create the minimal required Hugo configuration `config.toml`. For all configuration options see [here](#configuration).
```Toml
baseURL = "http://localhost"
diff --git a/exampleSite/content/posts/markdown.md b/exampleSite/content/posts/markdown.md
index e310220..7de36f8 100644
--- a/exampleSite/content/posts/markdown.md
+++ b/exampleSite/content/posts/markdown.md
@@ -17,6 +17,7 @@ The following HTML `
Test
+ @@ -111,6 +120,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou + {{< highlight html "linenos=table" >}} @@ -156,6 +166,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou + GIF is a bitmap image format. H2O @@ -165,5 +176,6 @@ Xn + Yn = Zn Press CTRL+ALT+Delete to end the session. Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. + diff --git a/exampleSite/content/posts/post-with-images/index.md b/exampleSite/content/posts/post-with-images/index.md index 95afe41..65d729b 100644 --- a/exampleSite/content/posts/post-with-images/index.md +++ b/exampleSite/content/posts/post-with-images/index.md @@ -9,7 +9,7 @@ tags: - Development resources: - name: testimage - src: 'images/testimage.jpg' + src: "images/testimage.jpg" title: This is a test image params: credits: "[David Pennington](https://unsplash.com/@dtpennington) on [Unsplash](https://unsplash.com/s/photos/test)" diff --git a/gulpfile.js b/gulpfile.js index 29dd083..64ef523 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,183 +1,191 @@ -const gulp = require('gulp'); -const rename = require('gulp-rename'); -const sass = require('gulp-sass'); -const cleanCSS = require('gulp-clean-css'); -const autoprefixer = require('gulp-autoprefixer'); -const iconfont = require('gulp-iconfont'); +const gulp = require("gulp"); +const rename = require("gulp-rename"); +const sass = require("gulp-sass"); +const cleanCSS = require("gulp-clean-css"); +const autoprefixer = require("gulp-autoprefixer"); +const iconfont = require("gulp-iconfont"); -const realFavicon = require('gulp-real-favicon'); -const path = require('path'); -const fs = require('fs'); +const realFavicon = require("gulp-real-favicon"); +const path = require("path"); +const fs = require("fs"); -const svgSprite = require('gulp-svg-sprite'); +const svgSprite = require("gulp-svg-sprite"); -var CSSDEST = 'static/' -var FAVICON_DATA_FILE = 'tmp/faviconData.json'; +var CSSDEST = "static/"; +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') - .pipe(sass({ errLogToConsole: true })) - .pipe(cleanCSS({ format: 'beautify' })) - .pipe(autoprefixer({ - cascade: false - })) - .pipe(gulp.dest(CSSDEST)) - .pipe(cleanCSS()) - .pipe(rename({ extname: '.min.css' })) - .pipe(gulp.dest(CSSDEST)) +gulp.task("sass", function () { + return gulp + .src("src/sass/main.scss") + .pipe(sass({ errLogToConsole: true })) + .pipe(cleanCSS({ format: "beautify" })) + .pipe( + autoprefixer({ + cascade: false, + }) + ) + .pipe(gulp.dest(CSSDEST)) + .pipe(cleanCSS()) + .pipe(rename({ extname: ".min.css" })) + .pipe(gulp.dest(CSSDEST)); }); -gulp.task('favicon-generate', function (done) { - realFavicon.generateFavicon({ - masterPicture: 'src/favicon/favicon-master.svg', - dest: 'static/favicon', - iconsPath: '/favicon', - design: { - ios: { - pictureAspect: 'backgroundAndMargin', - backgroundColor: '#2f333e', - margin: '14%', - assets: { - ios6AndPriorIcons: false, - ios7AndLaterIcons: false, - precomposedIcons: false, - declareOnlyDefaultIcon: true - } - }, - desktopBrowser: {}, - windows: { - pictureAspect: 'whiteSilhouette', - backgroundColor: '#2f333e', - onConflict: 'override', - assets: { - windows80Ie10Tile: false, - windows10Ie11EdgeTiles: { - small: false, - medium: true, - big: false, - rectangle: false - } - } - }, - androidChrome: { - pictureAspect: 'shadow', - themeColor: '#2f333e', - manifest: { - display: 'standalone', - orientation: 'notSet', - onConflict: 'override', - declared: true - }, - assets: { - legacyIcon: false, - lowResolutionIcons: false - } - }, - safariPinnedTab: { - pictureAspect: 'silhouette', - themeColor: '#2f333e' - } +gulp.task("favicon-generate", function (done) { + realFavicon.generateFavicon( + { + masterPicture: "src/favicon/favicon-master.svg", + dest: "static/favicon", + iconsPath: "/favicon", + design: { + ios: { + pictureAspect: "backgroundAndMargin", + backgroundColor: "#2f333e", + margin: "14%", + assets: { + ios6AndPriorIcons: false, + ios7AndLaterIcons: false, + precomposedIcons: false, + declareOnlyDefaultIcon: true, + }, }, - settings: { - scalingAlgorithm: 'Mitchell', - errorOnImageTooSmall: false, - readmeFile: false, - htmlCodeFile: false, - usePathAsIs: false - }, - markupFile: FAVICON_DATA_FILE - }, function () { - done(); - }); -}); - -gulp.task('favicon-check-update', function (done) { - var currentVersion = JSON.parse(fs.readFileSync(FAVICON_DATA_FILE)).version; - realFavicon.checkForUpdates(currentVersion, function (err) { - if (err) { - throw err; - } - }); - done(); -}); - -gulp.task('svg-sprite', function () { - config = { - shape: { - dimension: { - maxWidth: 24, - maxHeight: 24, - attributes: false, + desktopBrowser: {}, + windows: { + pictureAspect: "whiteSilhouette", + backgroundColor: "#2f333e", + onConflict: "override", + assets: { + windows80Ie10Tile: false, + windows10Ie11EdgeTiles: { + small: false, + medium: true, + big: false, + rectangle: false, }, - spacing: { - padding: 5, - box: 'content' - }, - dest: 'tmp/intermediate-svg', + }, }, - svg: { - xmlDeclaration: false, - rootAttributes: { - style: "position: absolute; width: 0; height: 0; overflow: hidden;" - } + androidChrome: { + pictureAspect: "shadow", + themeColor: "#2f333e", + manifest: { + display: "standalone", + orientation: "notSet", + onConflict: "override", + declared: true, + }, + assets: { + legacyIcon: false, + lowResolutionIcons: false, + }, }, - mode: { - inline: true, - symbol: { - dest: 'layouts/partials/', - sprite: 'svg-icon-symbols.html', - bust: false, - } - } - }; - - return gulp.src('src/icons/*.svg') - .pipe(svgSprite(config)) - .pipe(gulp.dest('.')); + safariPinnedTab: { + pictureAspect: "silhouette", + themeColor: "#2f333e", + }, + }, + settings: { + scalingAlgorithm: "Mitchell", + errorOnImageTooSmall: false, + readmeFile: false, + htmlCodeFile: false, + usePathAsIs: false, + }, + markupFile: FAVICON_DATA_FILE, + }, + function () { + done(); + } + ); }); -gulp.task('iconfont', function () { - var lastUnicode = 0xEA01; - var files = fs.readdirSync('src/iconfont'); - - // Filter files with containing unicode value - // and set last unicode - files.forEach(function (file) { - var basename = path.basename(file); - var matches = basename.match(/^(?:((?:u[0-9a-f]{4,6},?)+)\-)?(.+)\.svg$/i); - var currentCode = -1; - - if (matches && matches[1]) { - currentCode = parseInt(matches[1].split('u')[1], 16); - } - - if (currentCode >= lastUnicode) { - lastUnicode = ++currentCode; - } - }); - - return gulp.src(['src/iconfont/*.svg']) - .pipe(iconfont({ - startUnicode: lastUnicode, - fontName: 'GeekblogIcons', // required - prependUnicode: true, // recommended option - normalize: true, - fontHeight: 1001, - centerHorizontally: true, - formats: ['woff', 'woff2'], // default, 'woff2' and 'svg' are available - timestamp: TIMESTAMP, // recommended to get consistent builds when watching files - })) - .pipe(gulp.dest('static/fonts/')); +gulp.task("favicon-check-update", function (done) { + var currentVersion = JSON.parse(fs.readFileSync(FAVICON_DATA_FILE)).version; + realFavicon.checkForUpdates(currentVersion, function (err) { + if (err) { + throw err; + } + }); + done(); }); -gulp.task('default', gulp.series( - 'sass', - 'svg-sprite', - 'iconfont', - 'favicon-generate' -)); +gulp.task("svg-sprite", function () { + config = { + shape: { + dimension: { + maxWidth: 24, + maxHeight: 24, + attributes: false, + }, + spacing: { + padding: 5, + box: "content", + }, + dest: "tmp/intermediate-svg", + }, + svg: { + xmlDeclaration: false, + rootAttributes: { + style: "position: absolute; width: 0; height: 0; overflow: hidden;", + }, + }, + mode: { + inline: true, + symbol: { + dest: "layouts/partials/", + sprite: "svg-icon-symbols.html", + bust: false, + }, + }, + }; -gulp.task('devel', function () { - gulp.watch('src/sass/**/*.*css', gulp.series('sass')); + return gulp + .src("src/icons/*.svg") + .pipe(svgSprite(config)) + .pipe(gulp.dest(".")); +}); + +gulp.task("iconfont", function () { + var lastUnicode = 0xea01; + var files = fs.readdirSync("src/iconfont"); + + // Filter files with containing unicode value + // and set last unicode + files.forEach(function (file) { + var basename = path.basename(file); + var matches = basename.match(/^(?:((?:u[0-9a-f]{4,6},?)+)\-)?(.+)\.svg$/i); + var currentCode = -1; + + if (matches && matches[1]) { + currentCode = parseInt(matches[1].split("u")[1], 16); + } + + if (currentCode >= lastUnicode) { + lastUnicode = ++currentCode; + } + }); + + return gulp + .src(["src/iconfont/*.svg"]) + .pipe( + iconfont({ + startUnicode: lastUnicode, + fontName: "GeekblogIcons", // required + prependUnicode: true, // recommended option + normalize: true, + fontHeight: 1001, + centerHorizontally: true, + formats: ["woff", "woff2"], // default, 'woff2' and 'svg' are available + timestamp: TIMESTAMP, // recommended to get consistent builds when watching files + }) + ) + .pipe(gulp.dest("static/fonts/")); +}); + +gulp.task( + "default", + gulp.series("sass", "svg-sprite", "iconfont", "favicon-generate") +); + +gulp.task("devel", function () { + gulp.watch("src/sass/**/*.*css", gulp.series("sass")); }); diff --git a/src/sass/_defaults.scss b/src/sass/_defaults.scss index 622d909..cb361a9 100644 --- a/src/sass/_defaults.scss +++ b/src/sass/_defaults.scss @@ -11,7 +11,7 @@ $font-size-14: 0.875rem !default; $font-size-16: 1rem !default; $font-size-32: 2rem !default; -$border-radius: 0.30rem !default; +$border-radius: 0.3rem !default; // Grayscale $white: rgba(255, 255, 255, 1) !default; @@ -28,7 +28,7 @@ $black: rgba(0, 0, 0, 1) !default; $color-link: rgba(10, 83, 154, 1) !default; $color-link-visited: rgba(119, 73, 191, 1) !default; -$color-link-footer: rgba(255,163,30,1.0) !default; +$color-link-footer: rgba(255, 163, 30, 1) !default; $color-code: rgba($gray-200, 0.5) !default; @@ -51,5 +51,5 @@ $sm-breakpoint: 45rem !default; $hint-colors: ( info: rgba(102, 187, 255, 1), warning: rgba(255, 221, 102, 1), - danger: rgba(255, 102, 102, 1) + danger: rgba(255, 102, 102, 1), ) !default; diff --git a/src/sass/_fonts.scss b/src/sass/_fonts.scss index 1ea87d1..c56f858 100644 --- a/src/sass/_fonts.scss +++ b/src/sass/_fonts.scss @@ -1,6 +1,7 @@ @font-face { font-family: "Liberation Sans"; - src: url("fonts/LiberationSans-Bold.woff2") format("woff2"), url("fonts/LiberationSans-Bold.woff") format("woff"); + src: url("fonts/LiberationSans-Bold.woff2") format("woff2"), + url("fonts/LiberationSans-Bold.woff") format("woff"); font-weight: bold; font-style: normal; font-display: swap; @@ -17,7 +18,8 @@ @font-face { font-family: "Liberation Sans"; - src: url("fonts/LiberationSans-Italic.woff2") format("woff2"), url("fonts/LiberationSans-Italic.woff") format("woff"); + src: url("fonts/LiberationSans-Italic.woff2") format("woff2"), + url("fonts/LiberationSans-Italic.woff") format("woff"); font-weight: normal; font-style: italic; font-display: swap; @@ -25,7 +27,8 @@ @font-face { font-family: "Liberation Sans"; - src: url("fonts/LiberationSans.woff2") format("woff2"), url("fonts/LiberationSans.woff") format("woff"); + src: url("fonts/LiberationSans.woff2") format("woff2"), + url("fonts/LiberationSans.woff") format("woff"); font-weight: normal; font-style: normal; font-display: swap; @@ -33,7 +36,8 @@ @font-face { font-family: "Liberation Mono"; - src: url("fonts/LiberationMono.woff2") format("woff2"), url("fonts/LiberationMono.woff") format("woff"); + src: url("fonts/LiberationMono.woff2") format("woff2"), + url("fonts/LiberationMono.woff") format("woff"); font-weight: normal; font-style: normal; font-display: swap; @@ -41,7 +45,8 @@ @font-face { font-family: "Droid Sans"; - src: url("fonts/DroidSans.woff2") format("woff2"), url("fonts/DroidSans.woff") format("woff"); + src: url("fonts/DroidSans.woff2") format("woff2"), + url("fonts/DroidSans.woff") format("woff"); font-weight: normal; font-style: normal; font-display: swap; @@ -49,7 +54,8 @@ @font-face { font-family: "Metropolis"; - src: url("fonts/Metropolis.woff2") format("woff2"), url("fonts/Metropolis.woff") format("woff"); + src: url("fonts/Metropolis.woff2") format("woff2"), + url("fonts/Metropolis.woff") format("woff"); font-weight: normal; font-style: normal; font-display: swap; @@ -57,7 +63,8 @@ @font-face { font-family: "GeekblogIcons"; - src: url("fonts/GeekblogIcons.woff2") format("woff2"), url("fonts/GeekblogIcons.woff") format("woff"); + src: url("fonts/GeekblogIcons.woff2") format("woff2"), + url("fonts/GeekblogIcons.woff") format("woff"); font-weight: normal; font-style: normal; font-display: swap;