Repository navigation
Expand file tree
/
Copy pathastro.config.mjs
More file actions
90 lines (78 loc) · 3.19 KB
/
Copy pathastro.config.mjs
File metadata and controls
90 lines (78 loc) · 3.19 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 starlight from '@astrojs/starlight';
import { defineConfig } from 'astro/config';
import starlightLinksValidator from 'starlight-links-validator';
import { REPO_URL, SITE_URL } from './scripts/lib/docs-config.mjs';
import { sidebar } from './src/sidebar.mjs';
// https://astro.build/config
export default defineConfig({
site: SITE_URL,
trailingSlash: 'always',
build: { format: 'directory' },
// `cloud-api` became `account-api`: it documents the user's ACCOUNT — auth,
// inventory, friends — and sits next to the product `web-api`, where two
// pages both called an API needed their titles to say which is which. The old
// address keeps working: it was linked from the FAQ, the philosophy pages and
// anywhere outside this repo we cannot edit.
redirects: {
'/developers/cloud-api': '/developers/account-api/',
'/fr/developers/cloud-api': '/fr/developers/account-api/',
},
integrations: [
starlight({
title: 'TigerSystem',
description:
'The open NFC identity for 3D-printing filament — the TigerTag protocol, the apps built on it, and how to build your own.',
// The same icon set tigersystem.io serves, so the wiki shows the mark
// people already have in their tab bar. Copied from that site rather
// than re-exported, to keep the two identical.
favicon: '/favicon.ico',
defaultLocale: 'root',
locales: {
root: { label: 'English', lang: 'en' },
fr: { label: 'Français', lang: 'fr' },
},
social: [
{ icon: 'github', label: 'GitHub', href: 'https://github.com/TigerTag-Project' },
{ icon: 'discord', label: 'Discord', href: 'https://discord.gg/3Qv5TSqnJH' },
],
sidebar,
customCss: ['./src/styles/tigersystem.css'],
components: {
SiteTitle: './src/components/SiteTitle.astro',
PageTitle: './src/components/PageTitle.astro',
Head: './src/components/Head.astro',
Footer: './src/components/Footer.astro',
SocialIcons: './src/components/SocialIcons.astro',
ThemeSelect: './src/components/ThemeSelect.astro',
},
editLink: { baseUrl: `${REPO_URL}/edit/main/` },
lastUpdated: true,
head: [
{
tag: 'meta',
attrs: { property: 'og:image', content: `${SITE_URL}/assets/hero-tigersystem-ecosystem.png` },
},
{
tag: 'link',
attrs: { rel: 'icon', href: '/icon.png', type: 'image/png', sizes: '512x512' },
},
{
tag: 'link',
attrs: { rel: 'apple-touch-icon', href: '/apple-icon.png', type: 'image/png', sizes: '180x180' },
},
],
plugins: [
starlightLinksValidator({
errorOnRelativeLinks: false,
// A page with no translation yet is still served in that locale:
// Starlight falls back to the English content and labels it as such.
errorOnFallbackPages: false,
// Files served straight out of public/ (assets, press archives, the
// swatch playground) are not pages; sync-docs --check validates them.
exclude: ['/assets/**', '/press/*.zip', '/developers/*.html', '/llms.txt'],
}),
],
}),
],
});