dfe-analytical-services / dfe-analytical-services/analysts-guide

The contributing guidance for broken links needs updating

Open
#196 1 comment 0 reactions 0 assignees View on GitHub
bug documentation
Dominant language
R
Stars
6
Forks
9
PR merge metrics
No merged PRs in 30d

Description

**Describe the issue**
The contributing guidance states that you can use 'quarto check' to check for broken links. Quarto check does not appear to check for broken links and doesn't give any information about links.

**Desired outcome**
We should find another way of checking for broken links and then update the guidance.

**Screenshots**

![Image](https://github.com/user-attachments/assets/932c9327-554c-403f-aef2-e9ff49535ebc)

**Additional context**
I attempted to use the url_checker package, but not able to use directly with a quarto project. I trialled using rvest for scraping, which worked but then didn't get any further and did not create a branch or push anything.

Cam suggested: we could scrape the HTML and then put into a checking function like url_checker. We also could add a GitHub workflow to run a script which does that (rvest for scraping, can grab all the 'a' elements and then extract the href part to pass into a function. That would then be a form of automated test against the test site. Wary this may be more effort than it's worth at the point we are building a custom check for it.

Some starter code from Cam from scraping elsewhere:
rvest::read_html(url) |>
rvest::html_nodes("a") |>
rvest::html_attr("href")

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.