-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathastro.config.mjs
More file actions
68 lines (65 loc) · 2.15 KB
/
Copy pathastro.config.mjs
File metadata and controls
68 lines (65 loc) · 2.15 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
// @ts-check
import { readFileSync } from 'node:fs';
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import remarkGithubAlerts from 'remark-github-alerts';
import { fetchDocs } from '../shared/fetch-docs.mjs';
import { fetchSharedUi } from '../shared/fetch-shared-ui.mjs';
// Pull shared UI + markdown from repos at build time
await fetchSharedUi();
await fetchDocs('dev');
// BrightScript TextMate grammar vendored from rokucommunity (MIT). Version
// tracked in src/syntaxes/.version-info; sync-brightscript-grammar workflow
// re-fetches when Renovate bumps the ref.
const brightscriptGrammar = JSON.parse(
readFileSync(new URL('./src/syntaxes/brightscript.tmLanguage.json', import.meta.url), 'utf8')
);
// https://astro.build/config
export default defineConfig({
site: 'https://dev.jellyrock.app',
integrations: [
starlight({
title: 'JellyRock Dev Guide',
description: 'Developer documentation for JellyRock, a Jellyfin client for Roku.',
favicon: '/favicon.png',
expressiveCode: {
shiki: {
langs: [brightscriptGrammar],
langAlias: {
brighterscript: 'brightscript',
bs: 'brightscript',
},
},
},
head: [
{
tag: 'script',
attrs: {
defer: true,
// First-party Umami tracker via the same-origin /_a proxy
// (ADR-0006) so the CSP can stay strict script-src 'self'.
src: '/_a/script.js',
'data-website-id': 'de160b80-2b3e-488e-b9df-d9a92ca42e1c',
'data-host-url': 'https://dev.jellyrock.app/_a',
},
},
],
customCss: ['./src/shared-ui/tokens.css', './src/styles/theme.css', './src/styles/custom.css'],
components: {
Header: './src/components/Header.astro',
Footer: './src/components/Footer.astro',
PageFrame: './src/components/PageFrame.astro',
},
social: [
{ icon: 'github', label: 'GitHub', href: 'https://github.com/jellyrock/jellyrock' },
{ icon: 'matrix', label: 'Matrix', href: 'https://matrix.to/#/#jellyrock-app:matrix.org' },
],
editLink: {
baseUrl: 'https://github.com/jellyrock/jellyrock/edit/main/docs/dev/',
},
}),
],
markdown: {
remarkPlugins: [remarkGithubAlerts],
},
});