From e213337171dd332077cd32a364bdbdc71a5368d2 Mon Sep 17 00:00:00 2001 From: Reuben Tier Date: Mon, 4 Aug 2025 18:52:29 +0100 Subject: [PATCH] =?UTF-8?q?Revert=20"docs:=20mention=20.nojekyll=20file=20?= =?UTF-8?q?to=20avoid=20issues=20with=20=5Fastro=20directory=20(#=E2=80=A6?= =?UTF-8?q?"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 0ba9dba5b096f0356a07afadb819daa69a2068ce. --- src/content/docs/en/guides/deploy/github.mdx | 28 +------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/src/content/docs/en/guides/deploy/github.mdx b/src/content/docs/en/guides/deploy/github.mdx index b285e53ce1ed2..9de8c55fff639 100644 --- a/src/content/docs/en/guides/deploy/github.mdx +++ b/src/content/docs/en/guides/deploy/github.mdx @@ -6,7 +6,7 @@ sidebar: type: deploy i18nReady: true --- -import { Steps, FileTree } from '@astrojs/starlight/components'; +import { Steps } from '@astrojs/starlight/components'; You can use [GitHub Pages](https://pages.github.com/) to host an Astro website directly from a repository on [GitHub.com](https://github.com/). @@ -18,32 +18,6 @@ Astro maintains the official `withastro/action` to deploy your project with very ## Configure Astro for GitHub Pages -You can deploy your Astro site on GitHub Pages with a few configuration steps to ensure that your project can be processed and built successfully. - -### Preparing your Astro project for GitHub Pages - -By default, GitHub Pages applies Jekyll static site processing, which can interfere with files and folders that begin with an underscore such as Astro's `_astro/` directory. - -To prevent this Jekyll processing, add an empty `.nojekyll` file to your Astro project's `public/` directory. Astro will automatically copy this file into the final `dist/` folder during the build process. This disables Jekyll on GitHub Pages and ensures that your Astro project files are correctly served. - -The following example shows this file added to a minimal Astro project: - - - -- public/ - - **.nojekyll** - - favicon.svg -- src/ - - pages/ - - index.astro - - styles/ - - global.css -- astro.config.mjs -- package.json -- tsconfig.json - - - ### Deploying to a `github.io` URL Set the [`site`](/en/reference/configuration-reference/#site) and [`base`](/en/reference/configuration-reference/#base) options in `astro.config.mjs`.