Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Fix/broken links in learn quick start#2657

Merged
ovflowd merged 5 commits into
nodejs:mainfrom
miffili:fix/broken-links-in-learn-quick-start
Aug 21, 2022
Merged

Fix/broken links in learn quick start#2657
ovflowd merged 5 commits into
nodejs:mainfrom
miffili:fix/broken-links-in-learn-quick-start

Conversation

@miffili

@miffili miffili commented Aug 19, 2022

Copy link
Copy Markdown
Contributor

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run npm run lint:js -- --fix and/or npm run lint:md -- --fix for my JavaScript and/or Markdown changes.
    • This is important as most of the cases your code changes might not be correctly linted
  • I have run npm run test to check if all tests are passing, and/or npm run test -- -u to update snapshots if I created and/or updated React Components.
  • I have checked that the build works locally and that npm run build work fine.
  • I've covered new added functionality with unit tests if necessary.

Description

These changes fix the issues connected to broken links as described in #2647.
In order to provide a clear understanding I've sliced the commits as small as possible.

Note: some changes would already get implemented with @ovflowd's introduce several fixes within the nodejs.dev (styles, links, caching, functionality). But wanted to provide my changes for reference. So please feel free to include these in another PR. :)

  1. Some pages weren't created due to either
  • typos in learn.yaml respectively a file name not corresponding with the info given
  • a method in createMarkdownPages.js being faulty (check if path contained /index. defaulted to false)
  1. Also checked for internal links on /learn & used local links in order to prevent future breaks :) (used package was already in place)

Related Issues

Fixes #2647 & broken pages in general

This fixes the issue of pages not being created due to typos in yaml or name of file not corresponding with info given in learn.yaml.
This fixes the issue of pages not being created due to a check in getYamlPageIdentifier() always causing the check to return false.
Adjusted method used to .includes(/index.) to catch possible variants of <subfolder>/index files.
This fixes the issue of needing to possibly adjust links by hand in the future as the package `gatsby-plugin-catch-links` is already in use & kicks in when local links are used in markdown files.

@ovflowd ovflowd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing changes! Thank you so much for your contributions! 🎉 :shipit:

  • Codewise looks good!
  • Nice catch on the typos!
  • Thanks for updating the links 👌

@ovflowd ovflowd added bug Something isn't working good first issue Good for newcomers docs labels Aug 19, 2022
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Merging #2657 (7fba3e8) into main (a7c750e) will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##             main    #2657   +/-   ##
=======================================
  Coverage   83.46%   83.46%           
=======================================
  Files         103      103           
  Lines        1113     1113           
  Branches      310      310           
=======================================
  Hits          929      929           
  Misses        178      178           
  Partials        6        6           
Impacted Files Coverage Δ
util-node/createMarkdownPages.js 3.12% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ovflowd ovflowd merged commit f465a75 into nodejs:main Aug 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working docs good first issue Good for newcomers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some broken links exist in list at the end of article

3 participants