@regioneer/volto-rer-linkchecker
v1.1.0
Published
Volto add-on that shows editors a report of the broken and outdated links found in the site contents
Readme
RER: Link checker (@regioneer/volto-rer-linkchecker)
Volto add-on that shows editors a report of the broken and outdated links found in the site contents, so they can fix them.
This is the frontend part of rer-linkchecker.
The links are checked by the Plone add-on rer.linkchecker, which must be installed on the backend: this package only displays its results.
Features
- A "Site link check" page at
/controlpanel/linkchecker, with the links found by the last check, internal and external. - A "Check links" entry in the user menu of the Volto toolbar, shown only to the users allowed to see the report.
- Each link is grouped by the action the editor has to take:
- To fix: the link leads to a resource that is not available (
404,410). Remove or replace it. - To update: the link works but uses
httpinstead ofhttps. Edit the URL. - To check: the link could not be verified automatically (timeouts, connection errors, bot protection, server errors...). Check it by hand.
- To fix: the link leads to a resource that is not available (
- Filters by action (each option shows how many links it contains) and by link type (internal or external).
- For each link, the report shows the content that contains it, the link itself, a human-readable description of the outcome (for example "Resource not found" or "Invalid security certificate") and the action to take, shown on every row even when the report is not filtered.
- Pagination, with page sizes of the site default, 50 or 100 items.
- CSV export of the report, with the filters currently applied.
- The date and time of the last check, and distinct messages when no check has run yet or when no broken links were found.
Requirements
| Component | Version |
| --- | --- |
| Volto | 19 (developed and tested on 19.3) |
| React | 18 |
| Node.js | 22 or 24 |
| Plone backend | 6.1 or 6.2, with rer.linkchecker installed |
Installation
1. Backend
Install the rer.linkchecker Python package in your Plone backend and activate it in the add-ons control panel (or import the rer.linkchecker:default profile).
The check itself does not run from the browser: it is launched by the check_broken_links console script, usually scheduled once a day with cron.
See the backend documentation for the script options and the REST API.
2. Frontend
Add the package to the dependencies of your Volto project:
pnpm add @regioneer/volto-rer-linkcheckerThen add it to the add-ons in your volto.config.js:
const addons = ['@regioneer/volto-rer-linkchecker'];No further configuration is needed.
Usage
Log in with a user that has the rer.linkchecker: View report permission.
By default it is granted to the Manager, Site Administrator and Editor roles.
Open the user menu in the Volto toolbar and choose Check links, or go directly to /controlpanel/linkchecker.
The page shows the results of the last check run on the backend. To update them, run the check again on the backend: reloading the page is not enough.
Configuration
The add-on reads only the Volto setting config.settings.defaultPageSize, used as the default page size of the report.
Translations
The interface is available in English and Italian.
Links
- Source code: https://github.com/RegioneER/rer-linkchecker
- Issue tracker: https://github.com/RegioneER/rer-linkchecker/issues
- Backend add-on:
rer.linkchecker - Changelog: CHANGELOG.md
Development
This add-on lives in the rer-linkchecker monorepo, together with its backend.
It is developed in isolation with pnpm workspaces and mrs-developer.
Prerequisites: nvm, Node.js and pnpm, Make, Git and, optionally, Docker.
git clone [email protected]:RegioneER/rer-linkchecker.git
cd rer-linkchecker/frontend
make installStart the backend, then the frontend in a separate terminal:
make backend-docker-start
make startOther useful commands (run make help for the full list):
| Command | Description |
| --- | --- |
| make lint | Run ESLint, Prettier and Stylelint in check mode |
| make format | Run ESLint, Prettier and Stylelint in fix mode |
| make i18n | Extract the messages to translate into locales |
| make test | Run the unit tests |
Credits
Developed with the support of Regione Emilia-Romagna, which supports the PloneGov initiative.
This product was developed by the RedTurtle Technology team.
License
This package is licensed under the MIT license.
