SkillAgentSearch skills...

Deadlinks

Pelican plugin to validate availability of referenced external links

Install / Use

/learn @pelican-plugins/Deadlinks
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Dead Links: A Plugin for Pelican

Build Status PyPI Version Downloads License

This Pelican plugin scans links and check their status codes. For responses such as 403 or 404, the plugin adds a disabled class to the anchor, extends the anchor with a span label, and prints a warning to the console logger.

Installation

This plugin can be installed via:

python -m pip install pelican-deadlinks

As long as you have not explicitly added a PLUGINS setting to your Pelican settings file, then the newly-installed plugin should be automatically detected and enabled. Otherwise, you must add deadlinks to your existing PLUGINS list. For more information, please see the How to Use Plugins documentation.

Usage

To enable the dead link checker, set the DEADLINKS_VALIDATION option in your Pelican settings file to True. Alternatively, if you don’t want to validate links every time, you can selectively enable link validation at run-time via:

pelican content -e DEADLINKS_VALIDATION=true

Additionally, the following options can be changed:

DEADLINKS_OPTIONS = {
    "archive": True,
    "classes": ["custom-class1", "disabled"],
    "labels": True,
    "timeout_duration_ms": 1000,
    "timeout_is_error": False,
}

Options:

| Name | Description | Default value | | ------ | ----------- | ------------- | | archive | True/False. When enabled invalid links will be replaced with proper archive.org entry | True | | classes | List of classes to be add to anchor element | Empty list | | labels | Insert bootstrap's label after the anchor element | False | | timeout_duration_ms | Time in ms after which request is considered as timed out | 1000 | | timeout_is_error | True/False. When enabled every time out is considered as dead link | False |

Contributing

Contributions are welcome and much appreciated. Every little bit helps. You can contribute by improving the documentation, adding missing features, and fixing bugs. You can also help out by reviewing and commenting on existing issues.

To start contributing to this plugin, review the Contributing to Pelican documentation, beginning with the Contributing Code section.

License

This project is licensed under the MIT license.

View on GitHub
GitHub Stars16
CategoryDevelopment
Updated2mo ago
Forks8

Languages

Python

Security Score

95/100

Audited on Dec 29, 2025

No findings