Skip to content

Commit 275b6bb

Browse files
committed
Merge branch 'use-html-proofer'
2 parents 9ba6a5c + cddd33b commit 275b6bb

File tree

12 files changed

+68
-28
lines changed

12 files changed

+68
-28
lines changed

.github/workflows/validate.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ jobs:
2323
bundler-cache: true
2424
cache-version: 1
2525

26-
- name: Build
27-
run: rake build
26+
- name: Build & Validate
27+
run: rake validate

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,8 @@ gem 'kramdown-parser-gfm'
99
gem 'jekyll', 3.9
1010
gem 'jekyll-redirect-from'
1111

12+
# For testing output
13+
gem 'html-proofer'
14+
1215
# Avoid polling on windows
1316
gem 'wdm', '>= 0.1.0'

Gemfile.lock

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,21 @@ GEM
88
em-websocket (0.5.2)
99
eventmachine (>= 0.12.9)
1010
http_parser.rb (~> 0.6.0)
11+
ethon (0.15.0)
12+
ffi (>= 1.15.0)
1113
eventmachine (1.2.7)
1214
eventmachine (1.2.7-x64-mingw32)
1315
ffi (1.15.0)
1416
ffi (1.15.0-x64-mingw32)
1517
forwardable-extended (2.6.0)
18+
html-proofer (3.19.2)
19+
addressable (~> 2.3)
20+
mercenary (~> 0.3)
21+
nokogumbo (~> 2.0)
22+
parallel (~> 1.3)
23+
rainbow (~> 3.0)
24+
typhoeus (~> 1.3)
25+
yell (~> 2.0)
1626
http_parser.rb (0.6.0)
1727
i18n (0.9.5)
1828
concurrent-ruby (~> 1.0)
@@ -44,12 +54,23 @@ GEM
4454
rb-fsevent (~> 0.10, >= 0.10.3)
4555
rb-inotify (~> 0.9, >= 0.9.10)
4656
mercenary (0.3.6)
57+
mini_portile2 (2.6.1)
4758
neat (3.0.0)
4859
sass (~> 3.4)
4960
thor (~> 0.19)
61+
nokogiri (1.12.5)
62+
mini_portile2 (~> 2.6.1)
63+
racc (~> 1.4)
64+
nokogiri (1.12.5-x64-mingw32)
65+
racc (~> 1.4)
66+
nokogumbo (2.0.5)
67+
nokogiri (~> 1.8, >= 1.8.4)
68+
parallel (1.21.0)
5069
pathutil (0.16.2)
5170
forwardable-extended (~> 2.6)
5271
public_suffix (4.0.6)
72+
racc (1.5.2)
73+
rainbow (3.0.0)
5374
rake (12.3.3)
5475
rb-fsevent (0.10.4)
5576
rb-inotify (0.10.1)
@@ -63,13 +84,17 @@ GEM
6384
rb-fsevent (~> 0.9, >= 0.9.4)
6485
rb-inotify (~> 0.9, >= 0.9.7)
6586
thor (0.20.3)
87+
typhoeus (1.4.0)
88+
ethon (>= 0.9.0)
6689
wdm (0.1.1)
90+
yell (2.2.2)
6791

6892
PLATFORMS
6993
ruby
7094
x64-mingw32
7195

7296
DEPENDENCIES
97+
html-proofer
7398
jekyll (= 3.9)
7499
jekyll-redirect-from
75100
kramdown

Rakefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,13 @@ end
2323
task :build => [:dependencies, :submodules] do
2424
sh('bundle exec jekyll build --config _config.yml')
2525
end
26+
27+
task :validate => [:build] do
28+
# Explanation of arguments:
29+
# --assume-extension # Tells html-proofer that `.html` files can be accessed without the `.html` part in the url.
30+
# --disable-external # For speed. Ideally we'd check external links too, but ignoring for now.
31+
# --empty-alt-ignore # To avoid needing to fix lots upfront, we can migrate towards this later.
32+
# --allow-hash-href # Allow empty `#` links to mean "top of page". It's true that these can be errors, however we have far too many to really address this.
33+
# --url-swap # Adjust for Jekyll's baseurl. See https://github.com/gjtorikian/html-proofer/issues/618 for more.
34+
sh('bundle exec htmlproofer _site --assume-extension --disable-external --empty-alt-ignore --allow-hash-href --url-swap "^/docs/:/"')
35+
end

_includes/footer.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33
<div class="column d-4-12 m-2-12">
44
<h4>For Competitors</h4>
55
<ul class="sitemap">
6-
<li><a href="/teams/">Teams Dashboard</a></li>
7-
<li><a href="/ide/">IDE</a></li>
8-
<li><a href="/docs/">Documentation</a></li>
6+
<li><a href="{{ site.url }}/teams/">Teams Dashboard</a></li>
7+
<li><a href="{{ site.url }}/ide/">IDE</a></li>
8+
<li><a href="{{ site.url }}/docs/">Documentation</a></li>
99
</ul>
1010
</div>
1111
<div class="column d-4-12 m-2-12">
1212
<h4>Student Robotics</h4>
1313
<ul class="sitemap">
14-
<li><a href="/compete/">Compete</a></li>
15-
<li><a href="/volunteer/">Volunteer</a></li>
16-
<li><a href="/sponsor/">Sponsor</a></li>
14+
<li><a href="{{ site.url }}/compete/">Compete</a></li>
15+
<li><a href="{{ site.url }}/volunteer/">Volunteer</a></li>
16+
<li><a href="{{ site.url }}/sponsor/">Sponsor</a></li>
1717
</ul>
1818
</div>
1919
<div class="column d-4-12 m-2-12">
2020
<h4>&nbsp;</h4>
2121
<ul class="sitemap">
22-
<li><a href="/blog/">Blog</a></li>
23-
<li><a href="/events/">Events</a></li>
24-
<li><a href="/contact/">Contact us</a></li>
22+
<li><a href="{{ site.url }}/blog/">Blog</a></li>
23+
<li><a href="{{ site.url }}/events/">Events</a></li>
24+
<li><a href="{{ site.url }}/contact/">Contact us</a></li>
2525
</ul>
2626
</div>
2727
</div>

_includes/navigation.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
</div>
77
<ul id="navigation" class="full-navigation mobile-collapsed">
88
<li>
9-
<a class="page-link" href="/teams/">Teams</a>
9+
<a class="page-link" href="{{ site.url }}/teams/">Teams</a>
1010
</li>
1111
<li>
12-
<a class="page-link" href="/compete/">Compete</a>
12+
<a class="page-link" href="{{ site.url }}/compete/">Compete</a>
1313
</li>
1414
<li>
15-
<a class="page-link" href="/volunteer/">Volunteer</a>
15+
<a class="page-link" href="{{ site.url }}/volunteer/">Volunteer</a>
1616
</li>
1717
<li>
18-
<a class="page-link" href="/sponsor/">Sponsor</a>
18+
<a class="page-link" href="{{ site.url }}/sponsor/">Sponsor</a>
1919
</li>
2020
</ul>
2121
</nav>

kit/wifi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Note that, because the information for your robot's WiFi network is stored insid
2727
the WiFi network will disappear when you unplug the USB memory stick. It will reappear a few moments
2828
after you plug the USB memory stick into your robot.
2929

30-
If you are having any problems connecting to your robot, just head on over to the [forum](/forum)
30+
If you are having any problems connecting to your robot, just head on over to the [forum]({{ site.url }}/forum)
3131
and ask for help.
3232

3333
Interacting With Your Robot

programming/python/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ There are a number of tutorials out there which might help you to learn to progr
2626
[Google's Python Class](https://developers.google.com/edu/python) looks to be a good tutorial which has some lecture videos to go with it.
2727

2828
* [The Official Docs](https://docs.python.org/2.7/), for the version of python on the [Odroid Brain Boards](/docs/kit/brain_board).
29-
We also host a [copy](/docs/python) of docs for the precise version (2.7.5) that it uses.
29+
We also host a [copy]({{ site.url }}/docs/python) of docs for the precise version (2.7.5) that it uses.

programming/python/libraries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ yourself.
2222
* [scipy 1.5.4](https://pypi.org/project/scipy/1.5.4/)
2323

2424
If there are other libraries you would like included, please let us know
25-
[via the forums](/forum) and include a link to the package on [PyPI](https://pypi.org/).
25+
[via the forums]({{ site.url }}/forum) and include a link to the package on [PyPI](https://pypi.org/).
2626

2727
Robot Kit
2828
---------

team_admin/user_accounts.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ title: User Accounts
77
# User Accounts
88

99
Your User Account can be used to access the various online services that we host.
10-
These include the [forums](/forum), [IDE](/ide) and, for team-leaders,
11-
a [user management interface](/userman) (see [below](#UserManagement)).
10+
These include the [forums]({{ site.url }}/forum), [IDE]({{ site.url }}/ide) and, for team-leaders,
11+
a [user management interface][userman] (see [below](#UserManagement)).
1212

1313
### Getting an Account
1414
If you don't yet have an account, you should contact your team-leader,
@@ -34,7 +34,7 @@ They will be able to tell you the details of your account, or reset your passwor
3434

3535
### Password Change
3636
If you know your password, but want to change it,
37-
you can do this using the self service side of the [user management page](/userman).
37+
you can do this using the self service side of the [user management page][userman].
3838

3939
### Other Problems
4040
If your team-leader was unable to resolve your account issue,
@@ -45,7 +45,7 @@ you can ask them to email <{{ site.emails.accounts }}> for more help.
4545

4646
### Account creation
4747

48-
To create user accounts, visit the [user management page](/userman), and
48+
To create user accounts, visit the [user management page][userman], and
4949
log in. In a column on the left, you'll see a list of users currently
5050
registered for your team. At the bottom is a link marked 'Register users'.
5151
Click on this, and you'll be presented with a form for user details.
@@ -67,7 +67,7 @@ When an account is created it starts off as a competitor account. In order to
6767
allow your fellow team leaders to have full access to the user management pages
6868
(among other things), you should change them to being a team leader account.
6969

70-
You can change the type of an account in the [user management page](/userman):
70+
You can change the type of an account in the [user management page][userman]:
7171

7272
1. Select the user in question from the list on the left hand side
7373
1. Under 'Type' change the selection to 'Team Leader'
@@ -78,7 +78,7 @@ Feel free to add as many team leader accounts as you like; there's no upper limi
7878
### Account maintenance
7979

8080
If you need to update any user account data, find their username,
81-
reset their password or so forth, first log into the [user management page](/userman).
81+
reset their password or so forth, first log into the [user management page][userman].
8282

8383
Once there, you should find the users name in the list of registered
8484
users on the left, as well as their username. To check or update their details,
@@ -94,3 +94,5 @@ forget passwords, please find their account as described above and click the
9494
a single-use link to reset their password.
9595

9696
If you forget your own password, please contact <{{ site.emails.accounts }}>.
97+
98+
[userman]: {{ site.url }}/userman/

0 commit comments

Comments
 (0)