Skip to content

[DevOps] Create a test to check for broken links #1690

@flanakin

Description

@flanakin

⚠️ Problem

The public website hosted in the docs folder and the MS Learn documentation in the docs-mslearn folder both run the risk of having broken links.

🛠️ Solution

  • Create a PowerShell Pester test in the src/powershell/Tests folder that verifies links are not broken using the details below.
  • Create separate tests to check docs, docs-mslearn, docs-wiki, and other repo markdown files so they can run independently.
  • Make sure the website (docs) broken link tests are run whenever a PR updates the docs folder.
  • Make sure the documentation (docs-mslearn) broken link tests are run when a PR updates the docs-mslearn folder.
  • Make sure the wiki (docs-wiki) broken link tests are run when a PR updates the docs-wiki folder.
  • Make sure the repo broken link tests are run when a PR updates markdown outside of the docs, docs-mslearn, and docs-wiki folders.

ℹ️ Additional context

The website (docs) should only use relative links for files contained in docs. All other links should be fully qualified.

The documentation content (docs-mslearn) should use folder-relative links for files contained in the docs-mslearn folder, root-relative links for content that is not in this repo but is hosted on https://learn.microsoft.com/, and fully qualified links for anything else. Files in this folder should never use "https://learn.microsoft.com/" links explicitly. Those links should always be root relative.

The wiki (docs-wiki) should only use relative links for files contained in docs-wiki. All other links should be fully qualified.

All other markdown files in the repository should use relative links for other files in the repository or fully-qualified links for anything pointing outside the repository.

Links should never include a language/locale unless they are pointing to the Azure blog.

🙋‍♀️ Ask for the community

We could use your help:

  1. Please vote this issue up (👍) to prioritize it.
  2. Leave comments to help us solidify the vision.

Metadata

Metadata

Assignees

Labels

Skill: DevOpsGitHub setup and automation

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions