From 43205b00fee246a23232f0fac6e7392de80ec1cb Mon Sep 17 00:00:00 2001 From: MoonLyss Date: Wed, 7 Aug 2024 12:37:56 +0200 Subject: [PATCH] Add base --- .github/workflows/deploy-docs.yml | 4 ++-- astro.config.mjs | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 729d542..9848d60 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -9,8 +9,8 @@ on: types: [created] env: - SITE_URL: https://shaitanlyss.github.io/selenite-docs/ - + SITE_URL: https://shaitanlyss.github.io + SITE_BASE: '/selenite-docs' jobs: build: runs-on: ubuntu-latest diff --git a/astro.config.mjs b/astro.config.mjs index ab79020..5584899 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -2,10 +2,14 @@ import { defineConfig } from 'astro/config'; import starlight from '@astrojs/starlight'; import { loadEnv } from 'vite'; -const { SITE_URL = 'http://localhost:4444' } = loadEnv(process.env.NODE_ENV, process.cwd(), ""); +const { SITE_URL = 'http://localhost:4444', SITE_BASE = '' } = loadEnv(process.env.NODE_ENV, process.cwd(), ""); +console.log('SITE_URL', SITE_URL); +console.log('SITE_BASE', SITE_BASE); // https://astro.build/config export default defineConfig({ site: SITE_URL, + base: SITE_BASE, + trailingSlash: 'always', // prefetch: true, integrations: [ starlight({