From ee206aff49565a04e3753cf07dcf1787b0dc5850 Mon Sep 17 00:00:00 2001 From: Horus3 Date: Fri, 21 Oct 2016 22:29:31 +0200 Subject: Add Gulp + Journal + sane CSS + complete Rewrite + Piwik etc etc etc. --- .gitignore | 3 + Makefile | 13 +- config.toml | 6 +- content/journal/convert-losless.md | 8 + content/journal/disk-usage.md | 8 + content/journal/my-ip.md | 8 + content/journal/screen-off.md | 8 + .../journal/ssh-force-password-authentification.md | 8 + content/journal/tar-usage.md | 8 + content/projects.md | 37 +- gulpfile.js | 30 + layouts/404.html | 2 - layouts/_default/list.html | 26 + layouts/_default/single.html | 19 + layouts/index.html | 41 +- layouts/partials/css.tmpl | 672 +-------------------- layouts/partials/footer.tmpl | 22 + layouts/projects/single.html | 30 + package.json | 18 + static/custom.css | 90 +++ static/font.css | 17 + static/normalize.css | 427 +++++++++++++ static/skeleton.css | 430 +++++++++++++ 23 files changed, 1207 insertions(+), 724 deletions(-) create mode 100644 content/journal/convert-losless.md create mode 100644 content/journal/disk-usage.md create mode 100644 content/journal/my-ip.md create mode 100644 content/journal/screen-off.md create mode 100644 content/journal/ssh-force-password-authentification.md create mode 100644 content/journal/tar-usage.md create mode 100644 gulpfile.js create mode 100644 layouts/_default/list.html create mode 100644 layouts/_default/single.html create mode 100644 layouts/projects/single.html create mode 100644 package.json create mode 100644 static/custom.css create mode 100644 static/font.css create mode 100644 static/normalize.css create mode 100644 static/skeleton.css diff --git a/.gitignore b/.gitignore index a33931a..f03dc16 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,9 @@ *.swp *~ *.log +concat.css _/ public/ +gulp.css/ +node_modules/ diff --git a/Makefile b/Makefile index ceda70a..3dcfa83 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,17 @@ all: clean build -build: - hugo --ignoreCache --log=true --logFile=./log/hugo.log --verbose=false 1>/dev/null +build: clean + cd static && cat normalize.css skeleton.css font.css custom.css > concat.css + gulp + HUGO_TEST= hugo --ignoreCache --log=true --logFile=./log/hugo.log --verbose=false 1>/dev/null + gulp minifyhtml + rm -rf public/gulp.css/ + rm -f public/*.css clean: rm -rf public + rm -f static/concat.css + rm -rf static/gulp.css list: ls public @@ -23,3 +30,5 @@ deploy: clean build serve: hugo serve +test: + export HUGO_TEST=1 && hugo --ignoreCache --verbose=false diff --git a/config.toml b/config.toml index b2893f7..790fea9 100644 --- a/config.toml +++ b/config.toml @@ -2,9 +2,13 @@ baseurl = "https://www.iamfabulous.de/" languageCode = "en-us" title = "moehring" disableHugoGeneratorInject = true -disableRSS = true +disableRSS = false disableSitemap = true +edit = "vim" +pluralizeListTitles = "false" +paginate = 5 [params] language = "en-us" + isTest = 0 diff --git a/content/journal/convert-losless.md b/content/journal/convert-losless.md new file mode 100644 index 0000000..0fc4042 --- /dev/null +++ b/content/journal/convert-losless.md @@ -0,0 +1,8 @@ ++++ +date = "2016-10-21T18:28:33+02:00" +draft = false +title = "convert losless" + ++++ + +$ avconv -i movie.mp4 -target pal-dvd movie.mpg diff --git a/content/journal/disk-usage.md b/content/journal/disk-usage.md new file mode 100644 index 0000000..15920b3 --- /dev/null +++ b/content/journal/disk-usage.md @@ -0,0 +1,8 @@ ++++ +date = "2016-10-21T18:27:00+02:00" +draft = false +title = "sort by disk usage" + ++++ + +$ du -sh * | sort -hr | grep -iE "^[0-9]+([,.][0-9]+)?[mMgG]" diff --git a/content/journal/my-ip.md b/content/journal/my-ip.md new file mode 100644 index 0000000..2e4cebd --- /dev/null +++ b/content/journal/my-ip.md @@ -0,0 +1,8 @@ ++++ +date = "2016-10-21T18:41:34+02:00" +draft = false +title = "my ip" + ++++ + +$ curl -s https://ifconfig.iamfabulous.de diff --git a/content/journal/screen-off.md b/content/journal/screen-off.md new file mode 100644 index 0000000..3e45e77 --- /dev/null +++ b/content/journal/screen-off.md @@ -0,0 +1,8 @@ ++++ +date = "2016-10-21T18:40:52+02:00" +draft = false +title = "screen off" + ++++ + +$ xset dpms force off diff --git a/content/journal/ssh-force-password-authentification.md b/content/journal/ssh-force-password-authentification.md new file mode 100644 index 0000000..9fd1313 --- /dev/null +++ b/content/journal/ssh-force-password-authentification.md @@ -0,0 +1,8 @@ ++++ +date = "2016-10-21T16:46:19+02:00" +draft = false +title = "force password auth with ssh" + ++++ + +$ ssh -o PubkeyAuthentication=no user@ip diff --git a/content/journal/tar-usage.md b/content/journal/tar-usage.md new file mode 100644 index 0000000..d7a8aa9 --- /dev/null +++ b/content/journal/tar-usage.md @@ -0,0 +1,8 @@ ++++ +date = "2016-10-21T17:15:22+02:00" +draft = false +title = "quick help for tar " + ++++ + +$ tar --help | head diff --git a/content/projects.md b/content/projects.md index 536d838..ffe90be 100644 --- a/content/projects.md +++ b/content/projects.md @@ -2,42 +2,7 @@ date = "2016-10-20T15:44:19+02:00" draft = false title = "projects" -type = "page" +type = "projects" layout = "single" - +++ - -
- go back -
diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..fd95942 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,30 @@ +var gulp = require('gulp'); +var cssnano = require('gulp-cssnano'); +var htmlmin = require('gulp-htmlmin'); +var uncss = require('gulp-uncss'); + +gulp.task('default', function() { + // place code for your default task here + return gulp.src('static/concat.css') + .pipe(uncss({ + html: ['layouts/*.html', 'layouts/partials/*.html', 'layouts/_default/*.html'] + })) + .pipe(cssnano()) + .pipe(gulp.dest('./static/gulp.css')); +}); + +gulp.task('minifyhtml', function() { + gulp.src('public/*.html') + .pipe(htmlmin({collapseWhitespace: true})) + .pipe(gulp.dest('public/')); + gulp.src('public/projects/*.html') + .pipe(htmlmin({collapseWhitespace: true})) + .pipe(gulp.dest('public/projects/')); + gulp.src('public/journal/*/*.html') + .pipe(htmlmin({collapseWhitespace: true})) + .pipe(gulp.dest('public/journal/')); + return gulp.src('public/journal/*.html') + .pipe(htmlmin({collapseWhitespace: true})) + .pipe(gulp.dest('public/journal/')); +}); + diff --git a/layouts/404.html b/layouts/404.html index 63eda66..b40f7ea 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,9 +1,7 @@ {{partial "header.tmpl" .}}404 - not found
journal
+ go back +
+{{.Title}}
+ back to journal +
+welcome
welcome