From 01633f67eabb07e3d1097844fe5919413096cba4 Mon Sep 17 00:00:00 2001 From: Andrew Gioia Date: Fri, 14 Aug 2020 22:28:59 -0400 Subject: [PATCH] Adds HTML Tidy to build process for cleaner markup --- layouts/_default/baseof.html | 1 + package.json | 5 +++-- tidy.conf | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 tidy.conf diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 77edbec..612a0f6 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -8,6 +8,7 @@ + {{ with .OutputFormats.Get "rss" -}} {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} diff --git a/package.json b/package.json index 235fa22..880bdb1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@andrewgioia/blog", - "version": "1.0.1", + "version": "1.1.0", "description": "Longer form content by Andrew Gioia", "main": "public/index.html", "dependencies": { @@ -11,8 +11,9 @@ "test": "echo \"Error: no test specified\" && exit 1", "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", + "tidy": "tidy -config tidy.conf -mq public/**/*.html", "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": { "type": "git", diff --git a/tidy.conf b/tidy.conf new file mode 100644 index 0000000..dde0545 --- /dev/null +++ b/tidy.conf @@ -0,0 +1,6 @@ +indent: auto +indent-spaces: 2 +show-info: no +show-warnings: no +tidy-mark: no +wrap: 0 \ No newline at end of file