Skip to content

Commit 17b798e

Browse files
committed
Fix GitHub Pages deployment - update base path and asset references
1 parent 9ae05c5 commit 17b798e

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

.github/workflows/deploy.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ jobs:
3535
run: npm run build
3636
env:
3737
NODE_ENV: production
38-
BASE_URL: /tinypine-docs/
3938

4039
- name: Setup Pages
4140
uses: actions/configure-pages@v4

favicon.svg

Lines changed: 4 additions & 0 deletions
Loading

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<title>TinyPine.js - Minimal Reactive JavaScript Framework</title>
77
<meta name="description" content="Official documentation for TinyPine.js - a minimal reactive JavaScript framework">
8-
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
8+
<link rel="icon" type="image/svg+xml" href="./favicon.svg">
99
<link rel="preconnect" href="https://fonts.googleapis.com">
1010
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
1111
<link href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&display=swap" rel="stylesheet">
12-
<link rel="stylesheet" href="/style.css">
12+
<link rel="stylesheet" href="./style.css">
1313
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css">
1414
</head>
1515
<body class="h-full bg-gradient-to-br from-gray-50 via-pine-50/30 to-gray-50 dark:from-gray-900 dark:via-pine-950/20 dark:to-gray-900 transition-all duration-500">
@@ -203,7 +203,7 @@ <h3 class="px-4 text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase
203203
</div>
204204

205205
<!-- Scripts -->
206-
<script type="module" src="/main.js"></script>
206+
<script type="module" src="./main.js"></script>
207207

208208
</body>
209209
</html>

vite.config.js

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

3-
// Use BASE_URL env variable if provided, otherwise use root path for production
4-
const base = process.env.BASE_URL || '/'
5-
63
export default defineConfig({
7-
base,
4+
base: process.env.NODE_ENV === 'production' ? '/tinypine-docs/' : '/',
85
build: {
96
outDir: 'dist',
107
assetsDir: 'assets',

0 commit comments

Comments
 (0)