Skip to content

Commit

Permalink
Checking valid links (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
volkm authored Sep 4, 2024
2 parents 48ea1d3 + 848cc2c commit d4125c9
Show file tree
Hide file tree
Showing 35 changed files with 358 additions and 2,143 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/buildtest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Build and test Jekyll site
name: Build and test website

on:
pull_request:
workflow_dispatch:

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems
- name: Build and test
run: bundle exec rake test
- name: Test paper links
run: bundle exec rake test_paper_links
7 changes: 5 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
source "https://rubygems.org"
gem "jekyll", "~> 4.3.3"
gem "webrick", "~> 1.7"

group :jekyll_plugins do
gem "jekyll-scholar"
end


gem "webrick", "~> 1.7"
group :test do
gem "rake"
gem "html-proofer", "~> 5.0.9"
end
31 changes: 0 additions & 31 deletions IMPORTANT_LINKS

This file was deleted.

10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,13 @@ To build the website (and automatically rebuild after each modification) run the
bundle exec jekyll serve --livereload
```
If there are no errors reported, you can browse to [http://localhost:4000](http://localhost:4000) to open the website.

To test whether all links in the website are valid run the following:
```console
bundle exec rake test
```

To test whether all links provided in published papers remain valid run the following:
```console
bundle exec rake test_paper_links
```
25 changes: 25 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
require 'html-proofer'

task :test do
sh "bundle exec jekyll build"
HTMLProofer.check_directory('_site/', {
assume_extension: ['.html'],
ignore_urls: [
# These urls lead to some errors in html-proofer and were manually checked to be valid
'https://qcomp.org/benchmarks/index.html#crowds',
'https://qcomp.org/benchmarks/index.html#jobs',
'http://fizzed.com/oss/font-mfizz',
'https://cavconference.org/2017/accepted-papers',
'https://www.cse.msu.edu/~cse870/Materials/FaultTolerant/manual-galileo.htm#Editing%20in%20the%20Textual%20View',
'https://getfem.org/gmm.html',
'https://tempest-synthesis.org',
],
}).run
end

task :test_paper_links do
sh "bundle exec jekyll build"
HTMLProofer.check_file('paper_links.html', {
enforce_https: false,
}).run
end
Loading

0 comments on commit d4125c9

Please sign in to comment.