Repository navigation
Expand file tree
/
Copy pathastro.config.mjs
More file actions
90 lines (86 loc) · 3.46 KB
/
Copy pathastro.config.mjs
File metadata and controls
90 lines (86 loc) · 3.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// @ts-check
import { defineConfig } from 'astro/config'
import starlight from '@astrojs/starlight'
// The org Pages site is served at the root, so no `base` is needed. When a
// custom domain arrives, change `site` and add a CNAME file — nothing else.
const site = 'https://codeforfire.github.io'
const ORG = 'https://github.com/CodeForFire'
const LAGEBUCH = `${ORG}/lagebuch`
const FWASSIST = `${ORG}/FwAssist`
/**
* Developer-facing and English: linked, never copied.
* @param {Array<[label: string, link: string]>} items
*/
const github = (items) => ({
label: 'Auf GitHub',
collapsed: true,
items: items.map(([label, link]) => ({ label, link, attrs: { target: '_blank' } })),
})
export default defineConfig({
site,
// Lagebuch used to live at the root. Releases, the app's README and people's
// bookmarks still point at the old addresses, so keep them working.
redirects: {
'/download/': '/lagebuch/download/',
'/probefahrt/': '/lagebuch/probefahrt/',
'/rundgang/': '/lagebuch/rundgang/',
'/vergleich/': '/lagebuch/vergleich/',
'/datenschutz/': '/lagebuch/datenschutz/',
},
integrations: [
starlight({
title: 'CodeForFire',
description:
'Offline-Werkzeuge für die Feuerwehr — Lagebuch für den ELW, FwAssist für die Hosentasche. Open Source, ohne Cloud, ohne Abo.',
// Monolingual German: Starlight ships German UI strings, so search,
// navigation and "Auf dieser Seite" need no further configuration.
locales: {
root: { label: 'Deutsch', lang: 'de' },
},
favicon: '/bilder/favicon.png',
head: [
{ tag: 'meta', attrs: { property: 'og:image', content: `${site}/bilder/social-preview.png` } },
{ tag: 'meta', attrs: { property: 'og:image:alt', content: 'Lagebuch — Einsatzdokumentation für den ELW' } },
{ tag: 'meta', attrs: { name: 'twitter:card', content: 'summary_large_image' } },
],
customCss: ['./src/styles/custom.css'],
social: [{ icon: 'github', label: 'GitHub', href: ORG }],
sidebar: [
{
label: 'Lagebuch',
items: [
{ label: 'Start', slug: 'lagebuch' },
{ label: 'Probefahrt in 5 Minuten', slug: 'lagebuch/probefahrt' },
{ label: 'Rundgang durch einen Einsatz', slug: 'lagebuch/rundgang' },
{ label: 'Herunterladen und installieren', slug: 'lagebuch/download' },
{ label: 'Lagebuch im Vergleich', slug: 'lagebuch/vergleich' },
{ label: 'Datenschutz und Sicherheit', slug: 'lagebuch/datenschutz' },
github([
['Quellcode', LAGEBUCH],
['Releases', `${LAGEBUCH}/releases`],
['Roadmap', `${LAGEBUCH}/blob/main/ROADMAP.md`],
['Changelog', `${LAGEBUCH}/blob/main/CHANGELOG.md`],
['Fragen & Antworten', `${LAGEBUCH}/discussions`],
['Mitmachen', `${LAGEBUCH}/blob/main/CONTRIBUTING.md`],
]),
],
},
{
label: 'FwAssist',
items: [
{ label: 'Start', slug: 'fwassist' },
github([
['Quellcode', FWASSIST],
['Releases', `${FWASSIST}/releases`],
['Changelog', `${FWASSIST}/blob/main/CHANGELOG.md`],
['Ideen', `${FWASSIST}/discussions/categories/ideen`],
['Fragen & Antworten', `${FWASSIST}/discussions`],
]),
],
},
],
editLink: undefined,
lastUpdated: false,
}),
],
})