-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathlinks.sh
executable file
Β·37 lines (24 loc) Β· 1 KB
/
links.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
# URL swap might be causing this
# https://michaelcurrin.github.io/404.html
# --url-swap '\/code-cookbook/:/' \
#'https:\/\/github.com\/MichaelCurrin\/code-cookbook
# subpath
# Internal for metadata which is always absolute. So replace with local /.
# Note that other github.io links need to be checked still
# writing errors as 2> is useful for log output
# and in the case of bad flags, useful info is sent to both stdout and stderror.
# How to fix for baseurl. Unrelated to prod mode.
# why does https://github.com/MichaelCurrin fail
# This doesn't seem reliable overall as the number of failures changes each time. Maybe because of forced parallel use?
set -e
cd _site
htmlproofer . \
--external-only
#\
#2>~/Documents/proof/code-cookbook-3.log
# --assume-extension \
# --url-swap '^\/code-cookbook/:/,https:\/\/michaelcurrin.github.io\/code-cookbook/:/' \
# --url-ignore 'http:\/\/localhost\:4000,/edit/,/new/' \
# https:\/\/github.com\/MichaelCurrin
# what about against remote site rather?