Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Checking for broken links

S. Ishida edited this page Mar 24, 2020 · 1 revision

Run a script to check for broken links. Then, open an issue and a pull request to fix them.

  1. From your command line, enter ./build.sh in the codewind-docs repo master branch. This script checks for internal broken links and displays errors if any exist.
  2. If you find broken links, open an issue.
    • Note: If you see the following error, don't worry. It's a false positive that you don't need to fix.
      URL        `vscode:extension/IBM.codewind'
      Name       `this link'
      Parent URL http://localhost:8765/codewind/mdt-vsc-getting-started.html, line 707, col 36
      Base       http://localhost:8765/codewind/
      Real URL   vscode:extension/IBM.codewind
      Info       The URL is outside of the domain filter, checked only syntax.
      Result     Error: URL is unrecognized or has invalid syntax
      
  3. For each broken link, the script generates a message with the following values:
    • Parent URL: The page where the broken link resides.
    • Real URL: The link on the "Parent URL" page that is broken.
  4. From your command line, create a new branch from master and edit the broken link in the Parent URL file to fix it. When trying to figure out why a link is broken, consider the following scenarios:
    • Is the link formatted correctly?
      • To link from one codewind-docs file to another, use the [text to appear](permalink_name.html) format.
      • To link a file that is located outside of codewind-docs, use the [text to appear](full URL) format.
    • Did the full URL or the permalink name change?
      • If you suspect a file's permalink name changed, look at previously merged PRs to see if file names were changed.
    • Did the linked file get deleted?
      • Check the codewind-docs/docs/_documentations folder to see if a file still exists.
      • You might need to delete or replace the broken link from the Parent URL file.
  5. After you fix the links on your branch, run ./build.sh on your branch to make sure that the broken link notifications are cleared.
  6. If the links look good to go, create the pull request, receive committer approval, and merge.