When working with the readme.io documentation platform, I found it difficult to know if all the links in the page text and at the bottom of the page were valid. The links refer to page slugs, but these can change. Readme.io will maintain a valid link for a couple of page slug changes, but after that, the link will break. I also like to make sure that the page slugs match the titles of the pages, wherever possible.
It took me some time to check links manually, so I wrote a Python script to automate this process.
When I first started working with readme.io in early 2024, my first Python script used the readme API to pull the information about the page slugs. And I downloaded the Markdown files for all the pages containing the links to check.
Then when the GitHub integration was released, I updated the Python script to work with just the readme.io source files. I had to adapt the script because every top level source folder was called index.md, and also because there was a new section of front matter in each file. Because of these structural changes, the script is now able to check links in the reference section within the API docs or integration docs too.
Currently, the new script just prints output to the terminal, whereas the old script created a CSV file, but I am working on adding this functionality and I have added it to a GitHub repo at https://github.com/mjsmyth/readme_link_checker.