Skip to content

Domain-grouped summary of checked links #1998

@afalhambra-hivemq

Description

@afalhambra-hivemq

Description

It would be helpful to have an option to display a summary of all checked links grouped by domain at the end of a lychee run. This would provide a quick overview of which external services/sites are being referenced and how many links point to each.

Use Case

When checking documentation or large websites with many external links, understanding the distribution of links across domains helps with:

  • Identifying domain-specific issues: If many links to a single domain fail, it may indicate the domain is down or blocking requests, rather than individual broken links
  • Auditing external dependencies: Quickly see which external services your documentation relies on most heavily
  • Debugging exclusion patterns: Verify that exclusion rules are working as expected by seeing which domains remain in the check
  • Maintenance planning: Prioritize fixing links to domains with the most references

Suggested Output Format

Domain Summary (25 domains, 342 links checked):

  docs.example.com         89 links  [✓ 89]
  github.com               67 links  [✓ 65, ✗ 2]
  api.example.org          45 links  [✓ 44, ? 1]
  stackoverflow.com        38 links  [✓ 38]
  ...
  (showing top 10 of 25 domains, use --domain-summary=all for full list)

Possible Options

  • --domain-summary or -D: Enable domain summary (could accept values like none, top:N, all)
  • --domain-summary-min: Only show domains with at least N links
  • Integration with existing --format options (JSON, markdown, etc.)

Considerations

For runs with many domains, displaying all of them could be overwhelming. Possible mitigations:

  • Default to showing top N domains by link count
  • Provide a threshold option to filter low-count domains
  • In JSON output, always include full data regardless of display limits

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions