adds git pre-commit hook which checks links & fixes broken links - #256
Open
DougReeder wants to merge 2 commits into
Open
adds git pre-commit hook which checks links & fixes broken links#256DougReeder wants to merge 2 commits into
DougReeder wants to merge 2 commits into
Conversation
Why: to catch broken links early, when they take little effort to fix.
Why: 1. To restore the user experience 2. To make clear what links still need work
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Adds git pre-commit hook which checks links, fixes broken links & replaces others with empty fragment
Why?
Examples
...Hubs uses glTF standards it supports many of the map types associated with physically-based materials.
How to test
website, runnpm cigit add foo.mdgit commit, observe that commit is blockedgit add foo.mdgit commit, observe that the commit is allowedDocumentation of functionality
The Git pre-commit hook is installed just before the NPM
startscript is run, as it would be in normal development.In the rare case where this commit check should be bypassed, the
-nflag can be passed togit commitLimitations
Doesn't fix links that didn't have an obvious correction.
Doesn't have functionality to flag links which aren't standardized
Alternatives considered
There doesn't appear to be a Markdown linter that also checks links for reachability.
Open questions
Do we want a Markdown linter as well?
Additional details or related context
Valid paths which don't have a file of the same name, such as
spoke-optimization.html, should be added toignorePatternsinmlc-config.json