added html beautifier, more content

This commit is contained in:
Joshua Seigler 2017-02-13 01:06:51 -05:00
parent 548c6b88f7
commit 6a456783f5
12 changed files with 196 additions and 15 deletions

View file

@ -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'));
});

View file

@ -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",

View file

@ -12,3 +12,9 @@ theme = "eos"
[[menu.main]]
name = "Posts"
url = "/posts/"
[[menu.main]]
name = "Presentations"
url = "/presentations/"
[[menu.main]]
name = "Projects"
url = "/projects/"

3
src/content/_index.md Normal file
View file

@ -0,0 +1,3 @@
---
title: "Home"
---

View file

@ -0,0 +1,5 @@
---
title: "Blockchain: a semi-technical explanation"
---
https://www.youtube.com/watch?v=cFJwiTHxiac

View file

@ -0,0 +1,3 @@
---
title: "Projects"
---

View file

@ -1,10 +1,12 @@
{{ define "main" }}
<h1>Welcome!</h1>
<h2>Recent posts:</h2>
<h2>Recent updates:</h2>
<section class="posts">
{{ range where .Data.Pages "Section" "posts" }}
<a href="{{ .URL }}">{{ .Title }}</a>
{{ range .Data.Pages }}
<div>
<a href="{{ .URL }}">{{ .LinkTitle }}</a>
</div>
{{ end }}
</section>
<ul>

View file

@ -0,0 +1,11 @@
{{ define "title" }}Projects{{ end }}
{{ define "main" }}
{{ $projects := getJSON "https://api.github.com/users/seigler/repos" }}
<h1>Github Projects</h1>
<ul>
{{ range $projects }}
<li><a href="{{ .url }}">{{ .name }}</a></li>
{{ end }}
</ul>
{{ end }}

View file

@ -53,7 +53,8 @@ header nav a {
text-decoration: none;
}
header nav a:hover,
header nav a:focus {
header nav a:focus,
header nav a.active {
color: white;
background-color: #20282a;
outline: none;

File diff suppressed because one or more lines are too long

View file

@ -46,7 +46,7 @@ header {
color: #20282a;
nav a {
text-decoration: none;
&:hover, &:focus {
&:hover, &:focus, &.active {
color: @color-text;
background-color: #20282a;
outline: none;

136
yarn.lock
View file

@ -194,6 +194,10 @@ block-stream@*:
dependencies:
inherits "~2.0.0"
bluebird@^3.0.5:
version "3.4.7"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.7.tgz#f72d760be09b7f76d08ed8fae98b289a8d05fab3"
boolbase@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
@ -384,6 +388,13 @@ concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
config-chain@~1.1.5:
version "1.1.11"
resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.11.tgz#aba09747dfbe4c3e70e766a6e41586e1859fc6f2"
dependencies:
ini "^1.3.4"
proto-list "~1.2.1"
console-control-strings@^1.0.0, console-control-strings@~1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
@ -544,16 +555,40 @@ duplexer2@0.0.2:
dependencies:
readable-stream "~1.1.9"
duplexify@^3.5.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.0.tgz#1aa773002e1578457e9d9d4a50b0ccaaebcbd604"
dependencies:
end-of-stream "1.0.0"
inherits "^2.0.1"
readable-stream "^2.0.0"
stream-shift "^1.0.0"
ecc-jsbn@~0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505"
dependencies:
jsbn "~0.1.0"
editorconfig@^0.13.2:
version "0.13.2"
resolved "https://registry.yarnpkg.com/editorconfig/-/editorconfig-0.13.2.tgz#8e57926d9ee69ab6cb999f027c2171467acceb35"
dependencies:
bluebird "^3.0.5"
commander "^2.9.0"
lru-cache "^3.2.0"
sigmund "^1.0.1"
electron-to-chromium@^1.2.1:
version "1.2.2"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.2.2.tgz#e41bc9488c88e3cfa1e94bde28e8420d7d47c47c"
end-of-stream@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.0.0.tgz#d4596e702734a93e40e9af864319eabd99ff2f0e"
dependencies:
once "~1.3.0"
end-of-stream@~0.1.5:
version "0.1.5"
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-0.1.5.tgz#8e177206c3c80837d85632e8b9359dfe8b2f6eaf"
@ -697,6 +732,10 @@ forever-agent@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
fork-stream@^0.0.4:
version "0.0.4"
resolved "https://registry.yarnpkg.com/fork-stream/-/fork-stream-0.0.4.tgz#db849fce77f6708a5f8f386ae533a0907b54ae70"
form-data@~2.1.1:
version "2.1.2"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4"
@ -917,6 +956,22 @@ gulp-clean@^0.3.2:
rimraf "^2.2.8"
through2 "^0.4.2"
gulp-html-beautify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/gulp-html-beautify/-/gulp-html-beautify-1.0.1.tgz#2834c6f77669605726eee55e3205f63074b7a152"
dependencies:
js-beautify "^1.5.10"
rcloader "^0.1.4"
through2 "^2.0.0"
gulp-if@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/gulp-if/-/gulp-if-2.0.2.tgz#a497b7e7573005041caa2bc8b7dda3c80444d629"
dependencies:
gulp-match "^1.0.3"
ternary-stream "^2.0.1"
through2 "^2.0.1"
gulp-less@^3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/gulp-less/-/gulp-less-3.3.0.tgz#d085565da3c810307fde7c7874e86520dc503234"
@ -928,6 +983,12 @@ gulp-less@^3.3.0:
through2 "^2.0.0"
vinyl-sourcemaps-apply "^0.2.0"
gulp-match@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/gulp-match/-/gulp-match-1.0.3.tgz#91c7c0d7f29becd6606d57d80a7f8776a87aba8e"
dependencies:
minimatch "^3.0.3"
gulp-notify@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/gulp-notify/-/gulp-notify-3.0.0.tgz#a04b8af9acdbe4e63c845678ce0c3d30694c59a3"
@ -1340,6 +1401,15 @@ js-base64@^2.1.9:
version "2.1.9"
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce"
js-beautify@^1.5.10:
version "1.6.9"
resolved "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.6.9.tgz#2df88c7c8d5bba9e7ff019d7a3e7b20b83cd576a"
dependencies:
config-chain "~1.1.5"
editorconfig "^0.13.2"
mkdirp "~0.5.0"
nopt "~3.0.1"
js-yaml@~3.7.0:
version "3.7.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80"
@ -1513,6 +1583,10 @@ lodash.clone@^4.3.2:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.clone/-/lodash.clone-4.5.0.tgz#195870450f5a13192478df4bc3d23d2dea1907b6"
lodash.clonedeep@^4.3.2:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
lodash.defaults@^4.0.1:
version "4.2.0"
resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c"
@ -1691,6 +1765,10 @@ lodash.values@~2.4.1:
dependencies:
lodash.keys "~2.4.1"
lodash@^3.0.1:
version "3.10.1"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6"
lodash@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-1.0.2.tgz#8f57560c83b59fc270bd3d561b690043430e2551"
@ -1710,6 +1788,12 @@ lru-cache@2:
version "2.7.3"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952"
lru-cache@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-3.2.0.tgz#71789b3b7f5399bec8565dda38aa30d2a097efee"
dependencies:
pseudomap "^1.0.1"
map-cache@^0.2.0:
version "0.2.2"
resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
@ -1733,6 +1817,12 @@ meow@^3.3.0:
redent "^1.0.0"
trim-newlines "^1.0.0"
merge-stream@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1"
dependencies:
readable-stream "^2.0.1"
merge@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da"
@ -1775,7 +1865,7 @@ minimatch@^2.0.1:
dependencies:
brace-expansion "^1.0.0"
minimatch@^3.0.0, minimatch@^3.0.2:
minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774"
dependencies:
@ -1800,7 +1890,7 @@ minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@~0.5.1:
"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@~0.5.0, mkdirp@~0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
dependencies:
@ -1857,7 +1947,7 @@ node.extend@^1.1.6:
dependencies:
is "^3.1.0"
nopt@~3.0.6:
nopt@~3.0.1, nopt@~3.0.6:
version "3.0.6"
resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9"
dependencies:
@ -2052,10 +2142,18 @@ promise@^7.1.1:
dependencies:
asap "~2.0.3"
proto-list@~1.2.1:
version "1.2.4"
resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849"
prr@~0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a"
pseudomap@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
punycode@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
@ -2084,6 +2182,19 @@ rc@~1.1.6:
minimist "^1.2.0"
strip-json-comments "~1.0.4"
rcfinder@^0.1.6:
version "0.1.9"
resolved "https://registry.yarnpkg.com/rcfinder/-/rcfinder-0.1.9.tgz#f3e80f387ddf9ae80ae30a4100329642eae81115"
dependencies:
lodash.clonedeep "^4.3.2"
rcloader@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/rcloader/-/rcloader-0.1.4.tgz#d0c902f0444983a2ee5a6907937c6a79ca704509"
dependencies:
lodash "^3.0.1"
rcfinder "^0.1.6"
read-pkg-up@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
@ -2108,7 +2219,7 @@ read-pkg@^1.0.0:
isarray "0.0.1"
string_decoder "~0.10.x"
"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2:
readable-stream@^2.0.0, "readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e"
dependencies:
@ -2268,7 +2379,7 @@ shellwords@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.0.tgz#66afd47b6a12932d9071cbfd98a52e785cd0ba14"
sigmund@~1.0.0:
sigmund@^1.0.1, sigmund@~1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590"
@ -2350,6 +2461,10 @@ stream-consume@~0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/stream-consume/-/stream-consume-0.1.0.tgz#a41ead1a6d6081ceb79f65b061901b6d8f3d1d0f"
stream-shift@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952"
string-width@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
@ -2463,7 +2578,16 @@ tar@~2.2.1:
fstream "^1.0.2"
inherits "2"
through2@2.X, through2@^2, through2@^2.0.0, through2@^2.0.3:
ternary-stream@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/ternary-stream/-/ternary-stream-2.0.1.tgz#064e489b4b5bf60ba6a6b7bc7f2f5c274ecf8269"
dependencies:
duplexify "^3.5.0"
fork-stream "^0.0.4"
merge-stream "^1.0.0"
through2 "^2.0.1"
through2@2.X, through2@^2, through2@^2.0.0, through2@^2.0.1, through2@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be"
dependencies: