From db50278e1b9ffc835177fb500b1634d8b8216b97 Mon Sep 17 00:00:00 2001 From: skirtle <65301168+skirtles-code@users.noreply.github.com> Date: Wed, 17 Jan 2024 17:59:53 +0000 Subject: [PATCH] docs: GitHub Pages supports clean URLs --- docs/guide/routing.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/guide/routing.md b/docs/guide/routing.md index 641807e4..945e63c0 100644 --- a/docs/guide/routing.md +++ b/docs/guide/routing.md @@ -129,9 +129,9 @@ To serve clean URLs with VitePress, server-side support is required. By default, VitePress resolves inbound links to URLs ending with `.html`. However, some users may prefer "Clean URLs" without the `.html` extension - for example, `example.com/path` instead of `example.com/path.html`. -Some servers or hosting platforms (for example Netlify or Vercel) provide the ability to map a URL like `/foo` to `/foo.html` if it exists, without a redirect: +Some servers or hosting platforms (for example Netlify, Vercel, GitHub Pages) provide the ability to map a URL like `/foo` to `/foo.html` if it exists, without a redirect: -- Netlify supports this by default. +- Netlify and GitHub Pages support this by default. - Vercel requires enabling the [`cleanUrls` option in `vercel.json`](https://vercel.com/docs/concepts/projects/project-configuration#cleanurls). If this feature is available to you, you can then also enable VitePress' own [`cleanUrls`](../reference/site-config#cleanurls) config option so that: @@ -139,7 +139,7 @@ If this feature is available to you, you can then also enable VitePress' own [`c - Inbound links between pages are generated without the `.html` extension. - If current path ends with `.html`, the router will perform a client-side redirect to the extension-less path. -If, however, you cannot configure your server with such support (e.g. GitHub pages), you will have to manually resort to the following directory structure: +If, however, you cannot configure your server with such support, you will have to manually resort to the following directory structure: ``` .