From 43e78772c01f4d404493c50a8acc62979ed107cf Mon Sep 17 00:00:00 2001 From: Lars Marowsky-Bree Date: Fri, 23 Apr 2021 15:21:05 +0200 Subject: [PATCH 1/4] Adding HTMLProofer to Travis build Signed-off-by: Lars Marowsky-Bree --- .travis.yml | 22 ++++++++++++++++++++-- Gemfile | 4 ++++ Rakefile | 25 +++++++++++++++++++++++++ _config.yml | 5 +++++ 4 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 Rakefile diff --git a/.travis.yml b/.travis.yml index d1ec488..0962011 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,25 @@ language: ruby rvm: -- 2.3 -script: bundle exec jekyll build +- 2.7 +script: + - bundle exec jekyll build + - bundle exec rake test + +cache: + directories: + - $TRAVIS_BUILD_DIR/tmp/.htmlproofer #https://github.com/gjtorikian/html-proofer/issues/381 + +env: + global: + - NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer + +addons: + apt: + packages: + - libcurl4-openssl-dev # required to avoid SSL errors + +sudo: false + deploy: provider: pages skip_cleanup: true diff --git a/Gemfile b/Gemfile index 0db4935..98003b9 100644 --- a/Gemfile +++ b/Gemfile @@ -18,3 +18,7 @@ group :jekyll_plugins do gem "kramdown", ">= 2.3.0" gem "rake" end + +group :test do + gem 'html-proofer' +end diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..85d288b --- /dev/null +++ b/Rakefile @@ -0,0 +1,25 @@ +abort('Please run this using `bundle exec rake`') unless ENV["BUNDLE_BIN_PATH"] +require 'html-proofer' + +desc "Test the website" +task :test do + sh "bundle exec jekyll build" + options = { + :check_sri => true, + :check_external_hash => true, + :check_html => true, + :check_img_http => true, + :check_opengraph => true, + :enforce_https => true, + :cache => { + :timeframe => '6w' + } + } + begin + HTMLProofer.check_directory("_site/", options).run + rescue => msg + puts "#{msg}" + end +end + +task :default => [:test] diff --git a/_config.yml b/_config.yml index dbeb737..a841093 100644 --- a/_config.yml +++ b/_config.yml @@ -23,6 +23,11 @@ header_pages: - FAQ.md - LICENSE.md +exclude: + - Gemfile + - Gemfile.lock + - Rakefile + collections: minutes: output: true From c9767ea56e114df4768dd585ec0ce653aacbe4be Mon Sep 17 00:00:00 2001 From: Lars Marowsky-Bree Date: Fri, 23 Apr 2021 15:55:51 +0200 Subject: [PATCH 2/4] Repair HTML problems found by HTMLProofer Signed-off-by: Lars Marowsky-Bree --- FAQ.md | 2 +- LICENSE.md | 2 +- _posts/2021-04-19-hello-world-blog.md | 2 +- index.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/FAQ.md b/FAQ.md index e54a9f7..f442c17 100644 --- a/FAQ.md +++ b/FAQ.md @@ -42,7 +42,7 @@ it's still Ceph underneath. **A:** Look at the [issue](https://github.com/aquarist-labs/aquarium/issues) list or check out our Slack channel (see below) and ask one of the friendly contributors. You can also view our [project board](https://github.com/orgs/aquarist-labs/projects/3) -and check our [Review Guidelines](CONTRIBUTING.md). +and check our [Review Guidelines](https://github.com/aquarist-labs/aquarium/blob/main/CONTRIBUTING.md). If you want to get your hands dirty as soon as possible, you can also run the script at `tools/setup-dev.sh`. This will ensure you have a basic development diff --git a/LICENSE.md b/LICENSE.md index 205bce5..1d962d3 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -11,6 +11,6 @@ This work is licensed under a [![CC BY-SA 4.0][cc-by-sa-image]][cc-by-sa] -[cc-by-sa]: http://creativecommons.org/licenses/by-sa/4.0/ +[cc-by-sa]: https://creativecommons.org/licenses/by-sa/4.0/ [cc-by-sa-image]: https://licensebuttons.net/l/by-sa/4.0/88x31.png [cc-by-sa-shield]: https://img.shields.io/badge/License-CC%20BY--SA%204.0-lightgrey.svg diff --git a/_posts/2021-04-19-hello-world-blog.md b/_posts/2021-04-19-hello-world-blog.md index bb77b06..dd6a1df 100644 --- a/_posts/2021-04-19-hello-world-blog.md +++ b/_posts/2021-04-19-hello-world-blog.md @@ -12,7 +12,7 @@ Welcome to Aquarium! If you want to get involved, look at the [issue](https://github.com/aquarist-labs/aquarium/issues) list or check out our Slack channel (see below) and ask one of the friendly contributors. You can also view our [project board](https://github.com/orgs/aquarist-labs/projects/3) -and check our [Review Guidelines](CONTRIBUTING.md). +and check our [Review Guidelines](https://github.com/aquarist-labs/aquarium/blob/main/CONTRIBUTING.md). If you want to get your hands dirty as soon as possible, you can also run the script at `tools/setup-dev.sh`. This will ensure you have a basic development diff --git a/index.md b/index.md index 9b501e6..7658a0b 100644 --- a/index.md +++ b/index.md @@ -8,7 +8,7 @@ list_title: "Blogs" Aquarium is a [SUSE](https://suse.com/)-sponsored Open Source project to build an easy-to-use, rock-solid appliance wrapped around the -[Ceph](http://ceph.io) project. The project started development in January 2021, +[Ceph](https://ceph.io) project. The project started development in January 2021, and has become a passion project for the storage team at SUSE. We are investigating the beginnings of a new storage appliance project in From 08884e8389873c3c9e67e4830e0cdbf5b1a2ccfc Mon Sep 17 00:00:00 2001 From: Lars Marowsky-Bree Date: Fri, 23 Apr 2021 16:04:50 +0200 Subject: [PATCH 3/4] Turn on HTML validation in full Signed-off-by: Lars Marowsky-Bree --- Rakefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Rakefile b/Rakefile index 85d288b..93f9d38 100644 --- a/Rakefile +++ b/Rakefile @@ -7,12 +7,21 @@ task :test do options = { :check_sri => true, :check_external_hash => true, + :check_favicon => false, :check_html => true, :check_img_http => true, :check_opengraph => true, :enforce_https => true, :cache => { :timeframe => '6w' + }, + :validation => { + :report_eof_tags => true, + :report_invalid_tags => true, + :report_mismatched_tags => true, + :report_missing_doctype => true, + :report_missing_names => true, + :report_script_embeds => true } } begin From 6cbea143f0a9bb7fd525bd9a66eaa6df8353109f Mon Sep 17 00:00:00 2001 From: Lars Marowsky-Bree Date: Fri, 23 Apr 2021 16:27:07 +0200 Subject: [PATCH 4/4] Remove breaking header HTML Signed-off-by: Lars Marowsky-Bree --- _layouts/default.html | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/_layouts/default.html b/_layouts/default.html index b63a3e3..6d8de8f 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,22 +1,5 @@ - - - {%- include head.html -%}