Skip to content

fredmansky/go-link-checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Craft CMS Broken Link Checker

A fast broken link checker based on SEOmatic sitemap* for Craft CMS projects.

Available Commands

  • check-links: Check links to see if they are broken.
  • fetch-links: Returns all URLs based on the provided sitemap.

Usage with Go

Fetch links

go run main.go fetch-links [URL]

For example: go run main.go fetch-links https://fredmansky.com/sitemap.xml

Check links

go run main.go check-links [URL]

For example: go run main.go check-links https://fredmansky.com/sitemap.xml -l 100

📌 What does -l (--rate-limit) do?

  • Limits the number of requests per second (LPS).
  • Example: -l 100 means 100 links are checked per second.
  • Default: 200

Usage with Docker

Fetch links

docker run fredmansky/go-link-checker fetch-links [URL]

For example: docker run fredmansky/go-link-checker fetch-links https://fredmansky.com/sitemap.xml

Check links

docker run fredmansky/go-link-checker check-links [URL]

For example: docker run fredmansky/go-link-checker check-links https://fredmansky.com/sitemap.xml


Publish a new docker version

  1. Commit and push all changes to gh.
  2. Login to Docker cli: docker login
  3. Build docker image: docker build -t go-link-checker .
  4. Add new docker tag: docker tag go-link-checker fredmansky/go-link-checker:latest
  5. Push to docker hub: docker push fredmansky/go-link-checker:latest

About

A fast link checker for seoMatic sitemap

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published