Skip to content

Commit d97f028

Browse files
committed
fix path
1 parent 751b1f3 commit d97f028

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.github/workflows/astro.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
- name: Install pnpm
2929
run: npm install -g pnpm
30-
30+
3131
- name: Setup Node
3232
uses: actions/setup-node@v4
3333
with:
@@ -45,7 +45,7 @@ jobs:
4545

4646
- name: Build with Astro
4747
run: |
48-
pnpm astro build \
48+
GITHUB_PAGES=true pnpm astro build \
4949
--site "${{ steps.pages.outputs.origin }}" \
5050
--base "${{ steps.pages.outputs.base_path }}"
5151
working-directory: ${{ env.BUILD_PATH }}

astro.config.mjs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,19 @@
22
import { defineConfig } from "astro/config";
33
import starlight from "@astrojs/starlight";
44

5+
const isGithubPages = process.env.GITHUB_PAGES === "true";
6+
7+
const base = isGithubPages ? "/godot-rust-faq/" : "/";
8+
59
// https://astro.build/config
610
export default defineConfig({
711
redirects: {
8-
"/": "/how/custom_classes",
12+
"/": `${base}how/custom_classes/`,
913
},
1014
integrations: [
1115
starlight({
1216
title: "Godot Rust FAQ",
13-
lastUpdated:true,
17+
lastUpdated: true,
1418

1519
social: [
1620
{
@@ -30,9 +34,7 @@ export default defineConfig({
3034
},
3135
{
3236
label: "Common Errors",
33-
items: [
34-
"errors/errors",
35-
],
37+
items: ["errors/errors"],
3638
},
3739
],
3840
}),

0 commit comments

Comments
 (0)