Adds HTML Tidy to build process for cleaner markup

This commit is contained in:
Andrew Gioia 2020-08-14 22:28:59 -04:00
parent ce7bbd5d1d
commit 01633f67ea
3 changed files with 10 additions and 2 deletions

View File

@ -8,6 +8,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Long form thoughts on technology, fatherhood, and making things, researched and written by Andrew Gioia."> <meta name="description" content="Long form thoughts on technology, fatherhood, and making things, researched and written by Andrew Gioia.">
<meta name="generator" content="Hugo v0.74.3">
<link rel="stylesheet" href="/css/style.css"> <link rel="stylesheet" href="/css/style.css">
{{ with .OutputFormats.Get "rss" -}} {{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}

View File

@ -1,6 +1,6 @@
{ {
"name": "@andrewgioia/blog", "name": "@andrewgioia/blog",
"version": "1.0.1", "version": "1.1.0",
"description": "Longer form content by Andrew Gioia", "description": "Longer form content by Andrew Gioia",
"main": "public/index.html", "main": "public/index.html",
"dependencies": { "dependencies": {
@ -11,8 +11,9 @@
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"sass": "sass --no-source-map assets/scss/main.scss public/css/style.css", "sass": "sass --no-source-map assets/scss/main.scss public/css/style.css",
"watch": "sass --no-source-map --watch assets/scss/main.scss public/css/style.css", "watch": "sass --no-source-map --watch assets/scss/main.scss public/css/style.css",
"tidy": "tidy -config tidy.conf -mq public/**/*.html",
"editing": "hugo --environment development --watch=true", "editing": "hugo --environment development --watch=true",
"publish": "hugo && cp -R public/* /var/www/blog.andrewgioia.com/" "publish": "hugo && tidy -config tidy.conf -mq public/**/*.html && sass --no-source-map assets/scss/main.scss public/css/style.css && cp -R public/* /var/www/blog.andrewgioia.com/"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

6
tidy.conf Normal file
View File

@ -0,0 +1,6 @@
indent: auto
indent-spaces: 2
show-info: no
show-warnings: no
tidy-mark: no
wrap: 0