-
-
Notifications
You must be signed in to change notification settings - Fork 24
Fix link checker by moving configuration to lychee.toml file #249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for lustrous-melomakarona-3ee73e ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Co-authored-by: mmcky <8263752+mmcky@users.noreply.github.com>
|
@copilot is there a way to specify this in a |
Co-authored-by: mmcky <8263752+mmcky@users.noreply.github.com>
Co-authored-by: mmcky <8263752+mmcky@users.noreply.github.com>
Yes! I've moved the configuration to a |
The link checker was failing with 9 errors because it was trying to validate URLs in
_static/webpack-macros.htmlthat contain unprocessed Jinja2 template variables. This file is generated by thequantecon_book_themeduring the Jupyter Book build process but contains template syntax like:{{ pathto('_static/scripts/bootstrap.js', 1) }} {{ pathto('_static/styles/pydata-sphinx-theme.css', 1) }} {{ pathto('_static/vendor/fontawesome/6.5.2/css/all.min.css', 1) }}The link checker was interpreting these template variables as literal file URLs, causing "Cannot find file" errors for all 9 template references in the file.
Solution
Created a
lychee.tomlconfiguration file to centralize lychee settings and exclude_static/webpack-macros.html. This approach is cleaner and more maintainable than using command-line parameters in the workflow file. The configuration file includes:This prevents false positive errors while maintaining link checking for all legitimate content files.
Fixes #248.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.