gothinkster / realworld

"The mother of all demo apps" — Exemplary fullstack Medium.com clone powered by React, Angular, Node, Django, and many more
https://realworld-docs.netlify.app/
MIT License
80.65k stars 7.34k forks source link

feat(docs): add Vite Plugin to Remove .md Extensions from URLs #1580

Closed yurisldk closed 1 month ago

yurisldk commented 2 months ago

Description

This PR introduces a custom Vite plugin that removes .md file extensions from URLs during the build process. This fix addresses the common issue of 404 errors due to Markdown links containing .md extensions.

closes #1564

image

Motivation

In Astro and Vite projects, links to Markdown files often include the .md extension. This plugin automatically removes .md extensions from internal URLs, ensuring clean and functional links like /specifications/backend/api-response-format#users-for-authentication instead of /specifications/backend/api-response-format.md#users-for-authentication.

Benefits

This plugin ensures that all internal links remain functional and clean, improving both user experience and SEO.

Summary

copilot:summary

Details

copilot:walkthrough

stackblitz[bot] commented 2 months ago

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

netlify[bot] commented 2 months ago

Deploy Preview for realworld-docs failed.

Name Link
Latest commit 1fa55a52eea60db2f2be35b6a9e2023f44672296
Latest deploy log https://app.netlify.com/sites/realworld-docs/deploys/66fa51ead43ead0008161174
netlify[bot] commented 2 months ago

Deploy Preview for frabjous-strudel-0577e0 failed.

Name Link
Latest commit 1fa55a52eea60db2f2be35b6a9e2023f44672296
Latest deploy log https://app.netlify.com/sites/frabjous-strudel-0577e0/deploys/66fa51eaf5314f00086a00ae
geromegrignon commented 1 month ago

Thanks fro the contribution @yurisldk