chocolatey / docs

https://docs.chocolatey.org - new docs website
Apache License 2.0
151 stars 165 forks source link

Ensure correct URLs are in xref/sidebar navigation #1019

Closed st3phhays closed 2 weeks ago

st3phhays commented 2 weeks ago

Description Of Changes

With the switch to Astro, all urls now end in a trailing slash. This is a known change, however, the sidebar navigation was not updated to reflect that. Now, the sidebar navigation will correctly link to the correct URL which will avoid the browser redirecting to the correct URL. This change also updates Xref links automatically as well. This will help Google Search Console results and SEO.

Motivation and Context

This will help Google Search Console results and SEO.

Testing

  1. Run yarn dev. Inspect the left side bar item for "Why Chocolatey". Notice that the url now ends with a trailing slash why/ and when clicked, takes you to that url directly.
  2. Run yarn build and then yarn preview (to see production build). Inspect the left side bar item for "Why Chocolatey". Notice that the url now ends with a trailing slash why/ and when clicked, takes you to that url directly.
  3. In both cases, the left side navigation is correctly highlighted with the active page no matter where you navigate to.

Change Types Made

Change Checklist

Related Issue

n/a

gep13 commented 2 weeks ago

@st3phhays thank you for getting this fixed up!