52 lines
1.4 KiB
JavaScript
52 lines
1.4 KiB
JavaScript
import { defineConfig } from 'astro/config';
|
|
import starlight from '@astrojs/starlight';
|
|
import { sidebar } from './src/config/sidebar.mjs';
|
|
import { legacyBachelorRedirects } from './src/config/legacy-bachelor-redirects.mjs';
|
|
|
|
const site = process.env.SITE || 'http://localhost:4321';
|
|
const base = process.env.BASE || '/';
|
|
const normalizedBase = base === '/'
|
|
? ''
|
|
: `/${base.replace(/^\/+|\/+$/g, '')}`;
|
|
const matomoConsentScript = `${normalizedBase}/matomo-consent.js`;
|
|
|
|
export default defineConfig({
|
|
site,
|
|
base,
|
|
redirects: legacyBachelorRedirects,
|
|
integrations: [
|
|
starlight({
|
|
title: 'Incognito Wiki',
|
|
description: 'Academic knowledge and student resources maintained by MSV Incognito.',
|
|
lastUpdated: true,
|
|
sidebar,
|
|
logo: {
|
|
light: './src/assets/logo-dark.png',
|
|
dark: './src/assets/logo.svg',
|
|
alt: 'MSV Incognito',
|
|
replacesTitle: true,
|
|
},
|
|
favicon: '/favicon.ico',
|
|
customCss: ['./src/styles/incognito.css'],
|
|
head: [
|
|
{
|
|
tag: 'script',
|
|
attrs: {
|
|
src: matomoConsentScript,
|
|
defer: true,
|
|
},
|
|
},
|
|
],
|
|
social: [
|
|
{
|
|
icon: 'external',
|
|
label: 'MSV Incognito website',
|
|
href: 'https://msvincognito.nl/',
|
|
},
|
|
],
|
|
editLink: {
|
|
baseUrl: 'https://git.msvincognito.nl/Incognito-Tech/Incognito-Wiki/_edit/main/',
|
|
},
|
|
}),
|
|
],
|
|
});
|