Skip to content

Commit 9f7a750

Browse files
committed
Update base URL configuration and documentation
Changed default base URL to '/' for both production and development. Updated README to clarify base URL usage for GitHub Pages and custom deployments, simplifying instructions for setting BASE_URL.
1 parent 10ef6f2 commit 9f7a750

2 files changed

Lines changed: 7 additions & 12 deletions

File tree

README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,16 @@ Or push to the `main` branch and GitHub Actions will automatically deploy.
4040

4141
### Base URL
4242

43-
The project uses `/tinypine-docs/` as the base URL for GitHub Pages by default. If you're deploying to:
43+
The project uses `/` (root) as the base URL by default. If you're deploying to:
4444

45-
- **GitHub Pages with different repo name**: Set `BASE_URL` environment variable
45+
- **GitHub Pages subdirectory** (e.g., `username.github.io/repo-name/`): Set `BASE_URL` environment variable
4646
```bash
47-
BASE_URL=/your-repo-name/ npm run build
47+
BASE_URL=/repo-name/ npm run build
4848
```
4949

50-
- **Custom domain or root path**: Use `/` as base
50+
- **Custom domain or root deployment** (default): No need to change anything
5151
```bash
52-
BASE_URL=/ npm run build
53-
```
54-
55-
- **Subdirectory**: Specify your path
56-
```bash
57-
BASE_URL=/subdirectory/ npm run build
52+
npm run build
5853
```
5954

6055
### GitHub Pages Setup

vite.config.js

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

3-
// Use BASE_URL env variable if provided, otherwise use tinypine-docs for production
4-
const base = process.env.BASE_URL || (process.env.NODE_ENV === 'production' ? '/tinypine-docs/' : '/')
3+
// Use BASE_URL env variable if provided, otherwise use root path for production
4+
const base = process.env.BASE_URL || '/'
55

66
export default defineConfig({
77
base,

0 commit comments

Comments
 (0)