Closed acev0010 closed 9 months ago
Name | Link |
---|---|
Latest commit | e3792125c8fb167724915a9f59ea576528141ad6 |
Latest deploy log | https://app.netlify.com/sites/a11ycanada/deploys/655d015dec1c740008a4ae9f |
Deploy Preview | https://deploy-preview-423--a11ycanada.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
For clarification as of why there are two different link checkers: I was unable to make them work as one, so I had to separate them. 😔
This was replaced with this merge: #428
What does this pull request (PR) do? / Que fait cette demande « pull » (PR)?
This pull contains:
Below I will leave a breakdown of each script, how they run and its purpose:
Scripts and plugins
link-check.js
The markdown-link-checker is an implemented plugin from markdown-link-checker
To run the plugin type 'npm run link-check' in your terminal. The links will load in the terminal but only the broken ones will be generated inside a 'broken-links.json' in the root directory.
This command and plugin will check for links inside the "src\pages" directory, checking both English and French pages.
The link checker currently ignores:
markdown-to-html
The plugin used here is 'markdown-it-replace-link'.
This plugin will convert only markdown links such as
[Access Working Group (AWG)](/en/about/workinggroups/awg/)
to be converted into HTML links on build. This command runs automatically after writingnpm: run build.
replace-links.js
This doesn't use a plugin and instead uses a regex generously crafted by ChatGPT to change links inside each markdown file to work on HTML. This command runs automatically after writing
npm: run build.
For example, it will change:
From ./developpeurs-dapplication-web.md To ../developpeurs-dapplication-web/
Missing links
Below is a list of links that are either missing or have changed and I couldn't find, all these links are from the
src\pages
directory:The following links work on build but not in between markdown files
Additional information (optional) / Information additionnelle (optionel)
I tried used the linkinator plugin and it works in showing all the links that lead to 404, however I was unable to make it show me where the broken links are originated from. I'm leaving this information here in case I decide to give it another go.