Linkrot Example
This document provides a demonstration of the linkrot extension.
For now, the link reporting only appears in the console output or in a a file when rendering the document.
To see the results, render this document using the command line:
quarto render docs/qlinkrot-example.qmdDocument Configuration
The linkrot extension is enabled via the YAML header shown below:
title: "Linkrot Example"
format: html
filters:
- linkrot
extensions:
linkrot:
fail-on-error: false
timeout: 10
# output-file: "linkrot-report.txt" # Write results to file:
skip-patterns:
- "example\\.org" # Skip example.org domains
debug: false # Set to true to see detailed loggingUsage
When you render this document with quarto render, the extension will:
- Find all external links
- Check if they’re accessible
- Report any broken links in the console
Try adding some broken links and re-rendering to see the checker in action!
Debug Mode
To see detailed logging of what linkrot is doing, enable debug mode:
extensions:
linkrot:
debug: trueThis will show:
- Each URL being checked
- Curl commands executed
- Response status codes
- Cache hits and misses
- Pattern matching details
Saving Results
To save results to a file, add the output-file option:
extensions:
linkrot:
output-file: "linkrot-report.txt"Valid Links
Here are some links that should work:
Broken Links
The following are broken links that linkrot should identify:
Internal Links
Internal links are not checked (only external http/https links):
Skipped Links
This link matches our skip pattern and won’t be checked: