github-pages-template icon indicating copy to clipboard operation
github-pages-template copied to clipboard

Add a sniff for pretty URLs

Open fulldecent opened this issue 1 year ago • 1 comments

If built page includes a match:

m/href="[^"]+.html"/

which doesn't also match:

m@://@

then that is an error.


Or in normal English: you must not link to relative HTML files with the .html extension.

fulldecent avatar Nov 13 '24 22:11 fulldecent

This could be implemented with #122

fulldecent avatar May 01 '25 17:05 fulldecent

Here is how to do the search today with Perll

perl -0777 -ne 'while (/href="[^:"]+html?"/sg) { print "$ARGV: $&\n"; }' **/build/*.html

(our public-websites does not have any violations today)

fulldecent avatar Jun 05 '25 19:06 fulldecent

This is at

https://github.com/fulldecent/github-pages-template/blob/9ccd32ebefada445e1cccc85b9cfb01c9d0e9812/test/dirty-words.json#L15

fulldecent avatar Jun 05 '25 19:06 fulldecent