Add lychee link-check recipes to justfile#654
Open
ecomodeller wants to merge 1 commit into
Open
Conversation
A full quarto render takes minutes, so iterating on broken links is painful. Add three `just` recipes backed by lychee: - `linkcheck` checks .qmd sources offline (fast, no render). - `linkcheck-site` renders with `--no-execute` (skips Python cells) and checks the resulting `_site/`. Catches quartodoc-generated cross-refs and missing anchors that source-only checks can't see. - `linkcheck-online` adds external URL checks. Document the install in CONTRIBUTING.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A full
just docsrender takes minutes, so iterating on broken links is slow. This adds threelycheerecipes that give faster feedback:just linkcheck—.qmdsources, offline. Useful as a quick sanity check while writing prose; ~20ms locally. Does not see Quarto cross-refs like[foo](`modelskill.X`)since those aren't standard markdown.just linkcheck-site— renders the docs withquarto render --no-execute(a newdocs-fastrecipe; skips Python execution) and runs lychee against the resulting_site/. This is where quartodoc-generated cross-refs and anchors actually become checkable. Locally finds hundreds of real broken refs in the current site in ~85ms.just linkcheck-online—.qmdsources + external URLs.Install instructions for lychee are added to CONTRIBUTING.
Limitations
Lychee verifies that link targets exist, not that they are semantically correct. A link whose text describes "Observation" but whose target is a (real)
ModelResultpage will pass — that class of bug still needs human review.Test plan
just linkcheckruns and exits 0 against current.qmdsourcesjust linkcheck-sitebuilds via--no-executeand surfaces existing broken refs in the rendered sitejust --listshows the new recipes with descriptions