Skip to content

A tool to assist with finding broken links on your wagtail site.

License

Notifications You must be signed in to change notification settings

commonknowledge/wagtail-linkchecker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wagtail-linkchecker

A tool/plugin to assist with finding broken links on your wagtail site. This tool works asynchronously using django-background-task.

Installing

Install using pip:

pip install wagtail-linkchecker

It works with Wagtail 1.0 and upwards.

Using

To use, firstly you will need to add wagtaillinkchecker to your INSTALLED_APPS and run the migrations. There will now be an extra item on the settings panel of the wagtailadmin. Inside here you can enable or disable automated scanning (See below for more detail) or conduct a scan.

Conducting a scan

Conducting a scan will scan all of your wagtail pages, and detect all images and anchors with a src or href respectively. Utilising the requests and BeautifulSoup libraries, requests will be made to each link to make sure an appropriate response is received, and if no appropriate response is received, once the scan is complete, all broken links along with their status codes and reasons will appear.

Scan results will be stored.

Automated Scanning

If you want automated scanning to work you HAVE to set up a cron job. The cron job will need to run the management command linkchecker at an interval of your choosing. The automated scans will do the same as manually conducting a scan, but instead will email the last person to edit the page with broken links/images.

Command options

--do-not-send-mail
Don't send an email to administrators once scan is complete.
-v 2
Show more output in the logs

About

A tool to assist with finding broken links on your wagtail site.

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages

  • Python 78.0%
  • HTML 22.0%