Git Product home page Git Product logo

wagtail-linkchecker's Introduction

wagtail-linkchecker

A tool/plugin to assist with finding broken links on your wagtail site. This tool works asynchronously using celery.

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.

For scans to be conducted from the admin, you must be running a celery daemon. You can run the celery worker with celery -A wagtaillinkchecker worker -l info. See the Celery Documentation for more information. For production you'll want to run celery as a daemon using something like systemd. See Celery Daemonization for more information.

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.
--run-synchronously
Skip celery and run command synchronously (useful for automated scanning)
-v 2
Show more output in the logs

wagtail-linkchecker's People

Contributors

liambrenner avatar seb-b avatar po5i avatar spapas avatar nils-werner avatar alexgleason avatar markfinger avatar palamunder avatar timonweb avatar rinti avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.