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.qmd

Document 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 logging

Usage

When you render this document with quarto render, the extension will:

  1. Find all external links
  2. Check if they’re accessible
  3. 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: true

This 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"