mirror of
https://github.com/open-webui/docs
synced 2025-06-16 11:28:36 +00:00
docs: Add instructions for configuring environment variables in gh-pages and Docusaurus
This commit is contained in:
parent
3773374272
commit
fcba49e9ea
@ -25,6 +25,34 @@ We appreciate your interest in contributing tutorials to the Open WebUI document
|
|||||||
- `BASE_URL` set to `/docs` (or your chosen base URL for the fork).
|
- `BASE_URL` set to `/docs` (or your chosen base URL for the fork).
|
||||||
- `SITE_URL` set to `https://<your-github-username>.github.io/`.
|
- `SITE_URL` set to `https://<your-github-username>.github.io/`.
|
||||||
|
|
||||||
|
### 📝 Updating the GitHub Pages Workflow and Config File
|
||||||
|
|
||||||
|
If you need to adjust deployment settings to fit your custom setup, here’s what to do:
|
||||||
|
|
||||||
|
a. **Update `.github/workflows/gh-pages.yml`**
|
||||||
|
- Add environment variables for `BASE_URL` and `SITE_URL` to the build step if necessary:
|
||||||
|
```yaml
|
||||||
|
- name: Build
|
||||||
|
env:
|
||||||
|
BASE_URL: ${{ vars.BASE_URL }}
|
||||||
|
SITE_URL: ${{ vars.SITE_URL }}
|
||||||
|
run: npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
b. **Modify `docusaurus.config.ts` to Use Environment Variables**
|
||||||
|
- Update `docusaurus.config.ts` to use these environment variables, with default values for local or direct deployment:
|
||||||
|
```typescript
|
||||||
|
const config: Config = {
|
||||||
|
title: "Open WebUI",
|
||||||
|
tagline: "ChatGPT-Style WebUI for LLMs (Formerly Ollama WebUI)",
|
||||||
|
favicon: "img/favicon.png",
|
||||||
|
url: process.env.SITE_URL || "https://openwebui.com",
|
||||||
|
baseUrl: process.env.BASE_URL || "/",
|
||||||
|
...
|
||||||
|
};
|
||||||
|
```
|
||||||
|
- This setup ensures consistent deployment behavior for forks and custom setups.
|
||||||
|
|
||||||
3. **Enable GitHub Actions**
|
3. **Enable GitHub Actions**
|
||||||
|
|
||||||
- In your forked repository, navigate to the **Actions** tab.
|
- In your forked repository, navigate to the **Actions** tab.
|
||||||
@ -43,7 +71,7 @@ We appreciate your interest in contributing tutorials to the Open WebUI document
|
|||||||
|
|
||||||
6. **Browse to Your Forked Copy**
|
6. **Browse to Your Forked Copy**
|
||||||
|
|
||||||
- Visit `https://<your-github-username>.github.io/docs` to view your forked documentation.
|
- Visit `https://<your-github-username>.github.io/<BASE_URL>` to view your forked documentation.
|
||||||
|
|
||||||
7. **Draft Your Changes**
|
7. **Draft Your Changes**
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user