Skip to content

Commit f21344a

Browse files
fix
1 parent 856c04a commit f21344a

5 files changed

Lines changed: 10 additions & 14 deletions

File tree

.github/workflows/pages.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,6 @@ jobs:
3838
- name: Install dependencies
3939
run: npm ci --include=dev
4040

41-
- name: Configure Pages base path
42-
shell: bash
43-
run: |
44-
repo_name="${GITHUB_REPOSITORY#*/}"
45-
46-
if [[ "$repo_name" == *.github.io ]]; then
47-
echo "VITE_BASE_PATH=/" >> "$GITHUB_ENV"
48-
else
49-
echo "VITE_BASE_PATH=/$repo_name/" >> "$GITHUB_ENV"
50-
fi
51-
5241
- name: Test
5342
run: npm run test
5443

@@ -68,7 +57,7 @@ jobs:
6857
deploy:
6958
environment:
7059
name: github-pages
71-
url: ${{ steps.deployment.outputs.page_url }}
60+
url: https://adaengine.org/
7261
runs-on: ubuntu-latest
7362
needs: build
7463
steps:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The site is built with Vite and deployed to GitHub Pages through `.github/workfl
66

77
The workflow runs on pushes to `main` or `master`, installs dependencies with `npm ci`, runs `npm run test`, builds the static bundle with `npm run build`, and publishes `dist`.
88

9-
For project pages, the workflow sets `VITE_BASE_PATH` to `/<repository-name>/`. For user or organization pages ending in `.github.io`, it uses `/`.
9+
The production site is published at `https://adaengine.org/`, so the Vite base path defaults to `/`. Use `VITE_BASE_PATH` only for explicit non-root preview deployments.
1010

1111
## Markdown articles
1212

public/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
adaengine.org

src/routing.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,22 @@ assert.equal(normalizeBasePath('/'), '')
66
assert.equal(normalizeBasePath('.'), '')
77
assert.equal(normalizeBasePath('adawebsite'), '/adawebsite')
88

9+
assert.equal(normalizeRoutePath('/', '/'), '/')
10+
assert.equal(normalizeRoutePath('/blog', '/'), '/blog')
911
assert.equal(normalizeRoutePath('/adawebsite/', '/adawebsite/'), '/')
1012
assert.equal(normalizeRoutePath('/adawebsite/articles/release-notes', '/adawebsite/'), '/articles/release-notes')
1113
assert.equal(normalizeRoutePath('/articles/release-notes/', '/'), '/articles/release-notes')
1214
assert.equal(normalizeRoutePath('articles/release-notes', '/'), '/articles/release-notes')
1315
assert.equal(normalizeRoutePath('/adawebsite-other/articles/release-notes', '/adawebsite/'), '/adawebsite-other/articles/release-notes')
1416

17+
assert.equal(hrefFor('/', '/'), '/')
18+
assert.equal(hrefFor('/blog', '/'), '/blog')
1519
assert.equal(hrefFor('/', '/adawebsite/'), '/adawebsite/')
1620
assert.equal(hrefFor('/articles/release-notes', '/adawebsite/'), '/adawebsite/articles/release-notes')
1721
assert.equal(hrefFor('articles/release-notes', '/'), '/articles/release-notes')
1822

23+
assert.deepEqual(resolveRoute('/', '/'), { name: 'home' })
24+
assert.deepEqual(resolveRoute('/blog', '/'), { name: 'blog' })
1925
assert.deepEqual(resolveRoute('/adawebsite/', '/adawebsite/'), { name: 'home' })
2026
assert.deepEqual(resolveRoute('/adawebsite/blog', '/adawebsite/'), { name: 'blog' })
2127
assert.deepEqual(resolveRoute('/adawebsite/learn', '/adawebsite/'), { name: 'static-page', page: 'learn' })

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { defineConfig } from 'vite'
22

3-
const base = process.env.VITE_BASE_PATH ?? '/adawebsite/'
3+
const base = process.env.VITE_BASE_PATH ?? '/'
44

55
export default defineConfig({
66
base,

0 commit comments

Comments
 (0)