check_urls {accessrmd}R Documentation

Check an Rmarkdown for broken links.

Description

Check links within an Rmarkdown document for any urls that responds with an error.

Usage

check_urls(rmd_path)

Arguments

rmd_path

Path to the Rmd that requires links to be checked. Rmd must be output type html.

Value

Lines of any urls that respond with an error.

Examples


# create a testfile
links <- tempfile("mixed_links", fileext = ".rmd")
file.create(links)
writeLines("[a good link](https://datasciencecampus.ons.gov.uk/)
[a bad link](https://datasciencecampus.ons.gov.uk/broken)",
  con = links
)
# Test the file
check_urls(links)



[Package accessrmd version 1.0.0 Index]