mirror of
https://github.com/tachiyomiorg/website.git
synced 2024-11-01 07:25:06 +01:00
Use custom env for base directory
Enabling override ability needed for GitHub Pages
This commit is contained in:
parent
dd1fbf8b30
commit
b2f7924af3
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
@ -25,6 +25,8 @@ jobs:
|
|||||||
- run: npm ci
|
- run: npm ci
|
||||||
- name: Build
|
- name: Build
|
||||||
run: npm run docs:build
|
run: npm run docs:build
|
||||||
|
env:
|
||||||
|
VITE_BUILD: ${{ env.VITE_BUILD }}
|
||||||
- uses: actions/configure-pages@v2
|
- uses: actions/configure-pages@v2
|
||||||
- uses: actions/upload-pages-artifact@v1
|
- uses: actions/upload-pages-artifact@v1
|
||||||
with:
|
with:
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
import { defineConfig } from "vitepress";
|
import { defineConfig, loadEnv } from "vitepress";
|
||||||
|
|
||||||
// https://vitepress.dev/reference/site-config
|
// https://vitepress.dev/reference/site-config
|
||||||
export default defineConfig({
|
export default ({ mode }) => {
|
||||||
|
// Load app-level env vars to node-level env vars.
|
||||||
|
process.env = { ...process.env, ...loadEnv(mode, process.cwd()) };
|
||||||
|
|
||||||
|
return defineConfig({
|
||||||
lang: "en-US",
|
lang: "en-US",
|
||||||
title: "Tachiyomi",
|
title: "Tachiyomi",
|
||||||
description: "Free and open source manga reader for Android",
|
description: "Free and open source manga reader for Android",
|
||||||
@ -9,6 +13,9 @@ export default defineConfig({
|
|||||||
lastUpdated: true,
|
lastUpdated: true,
|
||||||
cleanUrls: true,
|
cleanUrls: true,
|
||||||
|
|
||||||
|
// Base directory, enabling override ability needed for GitHub Pages
|
||||||
|
base: process.env.VITE_BASE || "/",
|
||||||
|
|
||||||
head: [["meta", { name: "theme-color", content: "#4A74EA" }]],
|
head: [["meta", { name: "theme-color", content: "#4A74EA" }]],
|
||||||
|
|
||||||
themeConfig: {
|
themeConfig: {
|
||||||
@ -35,6 +42,7 @@ export default defineConfig({
|
|||||||
socialLinks: [{ icon: "github", link: "https://github.com/vuejs/vitepress" }],
|
socialLinks: [{ icon: "github", link: "https://github.com/vuejs/vitepress" }],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
|
||||||
function nav() {
|
function nav() {
|
||||||
return [
|
return [
|
||||||
|
Loading…
Reference in New Issue
Block a user