From 6a456783f564b6ba6783d00473f4ae9436b5536f Mon Sep 17 00:00:00 2001 From: Joshua Seigler Date: Mon, 13 Feb 2017 01:06:51 -0500 Subject: [PATCH] added html beautifier, more content --- gulpfile.js | 30 ++++- package.json | 2 + src/config.toml | 6 + src/content/_index.md | 3 + src/content/presentations/blockchain.md | 5 + src/content/projects/_index.md | 3 + src/themes/eos/layouts/index.html | 8 +- src/themes/eos/layouts/projects/list.html | 11 ++ src/themes/eos/static/css/bundle.css | 3 +- src/themes/eos/static/css/bundle.css.map | 2 +- src/themes/eos/styles/basics.less | 2 +- yarn.lock | 136 +++++++++++++++++++++- 12 files changed, 196 insertions(+), 15 deletions(-) create mode 100644 src/content/_index.md create mode 100644 src/content/projects/_index.md create mode 100644 src/themes/eos/layouts/projects/list.html diff --git a/gulpfile.js b/gulpfile.js index 133d854..b108942 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,6 +1,6 @@ /*jslint node: true -regexp: true*/ +*/ 'use strict'; /** @@ -25,6 +25,8 @@ var gulp = require('gulp'), svgmin = require('gulp-svgmin'), // minifies SVGs to save filesize notify = require('gulp-notify'), // pops up OS notifications revAll = require('gulp-rev-all'), // hashes static resources, updates references to them + gulpif = require('gulp-if'), // conditionally process part of a vinyl stream + htmlbeautify = require('gulp-html-beautify'), // clean up HTML formatting path = require('path'), spawn = require('child_process').spawn, // Define source and destination paths @@ -143,10 +145,32 @@ gulp.task('build:site', ['clean:site', 'build:less', 'build:icons'], function () child.on('close', function (code) { gutil.log("Done with exit code", code); gulp.src('./dist/**') + .pipe(gulpif('*.html', htmlbeautify({ + "indent_size": 2, + "indent_char": " ", + "eol": "\n", + "indent_level": 0, + "indent_with_tabs": false, + "preserve_newlines": false, + "max_preserve_newlines": 10, + "jslint_happy": false, + "space_after_anon_function": false, + "brace_style": "collapse", + "keep_array_indentation": false, + "keep_function_indentation": false, + "space_before_conditional": true, + "break_chained_methods": false, + "eval_code": false, + "unescape_strings": false, + "wrap_line_length": 0, + "wrap_attributes": "auto", + "wrap_attributes_indent_size": 4, + "end_with_newline": false + }))) .pipe(revAll.revision({ dontRenameFile: [ /^\/favicon\.ico$/g, - /.*\.html$/g, - /.*\.xml$/g + /\.html$/g, + /\.xml$/g ] })) .pipe(gulp.dest('./cdn')); }); diff --git a/package.json b/package.json index 428c415..c0de81f 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,8 @@ "gulp": "^3.9.1", "gulp-autoprefixer": "^3.1.1", "gulp-clean": "^0.3.2", + "gulp-html-beautify": "^1.0.1", + "gulp-if": "^2.0.2", "gulp-less": "^3.3.0", "gulp-notify": "^3.0.0", "gulp-plumber": "^1.1.0", diff --git a/src/config.toml b/src/config.toml index e5530a1..9c3e217 100644 --- a/src/config.toml +++ b/src/config.toml @@ -12,3 +12,9 @@ theme = "eos" [[menu.main]] name = "Posts" url = "/posts/" +[[menu.main]] + name = "Presentations" + url = "/presentations/" +[[menu.main]] + name = "Projects" + url = "/projects/" diff --git a/src/content/_index.md b/src/content/_index.md new file mode 100644 index 0000000..20aeb3f --- /dev/null +++ b/src/content/_index.md @@ -0,0 +1,3 @@ +--- +title: "Home" +--- diff --git a/src/content/presentations/blockchain.md b/src/content/presentations/blockchain.md index e69de29..bf722e7 100644 --- a/src/content/presentations/blockchain.md +++ b/src/content/presentations/blockchain.md @@ -0,0 +1,5 @@ +--- +title: "Blockchain: a semi-technical explanation" +--- + +https://www.youtube.com/watch?v=cFJwiTHxiac diff --git a/src/content/projects/_index.md b/src/content/projects/_index.md new file mode 100644 index 0000000..a80a9df --- /dev/null +++ b/src/content/projects/_index.md @@ -0,0 +1,3 @@ +--- +title: "Projects" +--- diff --git a/src/themes/eos/layouts/index.html b/src/themes/eos/layouts/index.html index 2ce5489..00d4c91 100644 --- a/src/themes/eos/layouts/index.html +++ b/src/themes/eos/layouts/index.html @@ -1,10 +1,12 @@ {{ define "main" }}

Welcome!

-

Recent posts:

+

Recent updates:

- {{ range where .Data.Pages "Section" "posts" }} - {{ .Title }} + {{ range .Data.Pages }} +
+ {{ .LinkTitle }} +
{{ end }}