GRO-685-3 Remove jekyll/ruby - #1282
Conversation
| @@ -0,0 +1,159 @@ | |||
| // usage: bun script/check-broken-links.ts [output-file] | |||
There was a problem hiding this comment.
We were using htmlproofer for this, but that's ruby. This is a (mostly) vibe-coded replacement for it. It's suspiciously fast, but in my testing, it catches the same broken links that htmlproofer would, and the output can still be piped into script/analyze_links.clj (e.g. for .github/workflows/update-docs-base-bun.yml).
One difference is it doesn't check opengraph links:
// OpenGraph is intentionally NOT checked even though it was previously with
// htmlproofer. It was essentially an expensive no-op since OG images are
// served over cdn and external urls are skipped.
const CHECK_OPEN_GRAPH = false;
gantoreno
left a comment
There was a problem hiding this comment.
Approving to not block, just one minor item re: link checking. Nice work!
| const TAG_RE = | ||
| /<(?:a|link|img|script|iframe|source|track)\b[^>]*?\s(?:href|src)="([^"]*)"[^>]*>/gi; |
There was a problem hiding this comment.
Seems like this only targets double quoted attributes, but there are many occurrences of single-quoted links in the _site output which are probably getting skipped
| // Existence only depends on the path; fragments/query strings don't | ||
| // point at separate files. | ||
| const urlPath = rawUrl.split("#")[0].split("?")[0]; | ||
| if (!urlPath) continue; // pure fragment/query, e.g. href="#section" |
There was a problem hiding this comment.
One thing HTMLProofer did was fragment validation, fine to go if we're intentionally skipping this as a minimal replacement, but it's a parity difference worth knowing
There was a problem hiding this comment.
If this is now wrapping astro commands, and we can now go through Bun for that, do we need to keep this?
| - gem install bundler -v 2.5.22 | ||
| - bundle _2.5.22_ config set --local path 'vendor/bundle' | ||
| - bundle _2.5.22_ install | ||
| - sudo yum install -y rsync |
GRO-685
PR env: https://gro-685-remove-jekyll.dkkh35gceu2po.amplifyapp.com/docs/latest/
Final removal of jekyll/ruby from docs repo.
All remaining jekyll/ruby code should be removed and anything that relied on it should use astro/bun.