Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add link validation script #70

Merged
merged 1 commit into from
May 17, 2022

Conversation

ras0219-msft
Copy link
Member

@ras0219-msft ras0219-msft commented May 17, 2022

This PR adds a script to check all documentation-internal links, ensuring that pages and anchors exist. Unfortunately, it operates on the generated html files, so it isn't easy to add as a pipeline step in microsoft/vcpkg for docs PRs.

It already has found several existing issues (which prevent me from adding it as a mandatory pipeline step):

$ node scripts/validateLinks.js
Broken internal link /en/docs/README.html -> /en/docs/specifications/export-command.html
Broken internal link /en/docs/README.html -> /en/docs/specifications/feature-packages.html
Broken fragment link /en/docs/about/faq.html -> /en/docs/users/integration.html#export
Broken fragment link /en/docs/users/config-environment.html -> /en/docs/users/binarycaching.html#Configuration
Broken fragment link /en/docs/users/config-environment.html -> /en/docs/users/binarycaching.html#Configuration
Broken fragment link /en/docs/users/config-environment.html -> /en/docs/users/binarycaching.html#Configuration
Broken fragment link /en/docs/users/config-environment.html -> /en/docs/users/binarycaching.html#NuGets-cache
Broken internal link /en/docs/users/integration.html -> /en/README.html
Broken fragment link /en/docs/users/integration.html -> /en/docs/users/triplets.html#VCPKG_CHAINLOAD_TOOLCHAIN_FILE
Broken fragment link /en/docs/users/manifests.html -> /en/docs/users/integration.html#cmake
Broken fragment link /en/docs/users/manifests.html -> /en/docs/users/integration.html#with-msbuild
Broken fragment link /en/docs/users/triplets.html -> /en/docs/users/integration.html#triplet-selection
Broken internal link /en/docs/maintainers/portfile-functions.html -> /en/docs/maintainers/ports/vcpkg-gn/vcpkg_gn_configure.html
Broken internal link /en/docs/maintainers/portfile-functions.html -> /en/docs/maintainers/ports/vcpkg-gn/vcpkg_gn_install.html
Broken fragment link /en/docs/maintainers/pr-review-checklist.html -> /en/docs/maintainers/maintainer-guide.html#Avoid-deprecated-helper-functions
Broken fragment link /en/docs/maintainers/pr-review-checklist.html -> /en/docs/maintainers/maintainer-guide.html#Avoid-excessive-comments-in-portfiles
Broken internal link /en/docs/maintainers/vcpkg_configure_gn.html -> /en/docs/maintainers/ports/vcpkg-gn/vcpkg_gn_configure.html
Broken internal link /en/docs/maintainers/vcpkg_install_gn.html -> /en/docs/maintainers/ports/vcpkg-gn/vcpkg_gn_install.html

I intend to address these issues in the main vcpkg repository, then regenerate the website and add this as a mandatory validation step to prevent future regressions.

@ras0219-msft ras0219-msft merged commit 900be5d into vcpkg:main May 17, 2022
@ras0219-msft ras0219-msft deleted the dev/roschuma/validate-links branch May 17, 2022 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants