-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathastro.config.mjs
More file actions
179 lines (169 loc) · 5.57 KB
/
astro.config.mjs
File metadata and controls
179 lines (169 loc) · 5.57 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
// @ts-check
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import starlightLinksValidator from 'starlight-links-validator';
import starlightVersions from 'starlight-versions'
import {rehypeHeadingIds} from '@astrojs/markdown-remark';
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
import sitemap from '@astrojs/sitemap';
import matomo from 'astro-matomo';
import tailwindcss from "@tailwindcss/vite";
//import markdown from "astro/dist/vite-plugin-markdown/index.js";
// https://astro.build/config
export default defineConfig({
site: 'https://ngx-translate.org',
trailingSlash: 'ignore',
markdown: {
rehypePlugins: [
rehypeHeadingIds,
[rehypeAutolinkHeadings, {
// Wrap the heading text in a link.
behavior: 'wrap'
}]]
},
redirects: {
// '/': "/getting-started"
},
integrations: [
sitemap({
filter: page => page !== 'https://ngx-translate.org/imprint' && page !== 'https://ngx-translate.org/privacy-notice'
}),
matomo({
enabled: import.meta.env.PROD,
// Only load in production
host: "https://analytics.codeandweb.com/",
setCookieDomain: "*.codeandweb.com",
siteId: 3,
heartBeatTimer: 5,
disableCookies: true,
debug: false
}),
starlight({
title: 'ngx-translate',
social: [ { icon: 'github', label: 'GitHub', href: 'https://github.com/ngx-translate/core' } ],
sidebar: [{
label: 'Start here',
items: [
{
label: "Getting started",
link: "/"
},
{
label: "Support & Compatibility",
link: "/getting-started/angular-compatibility/"
},
{
label: "Installation",
link: "/getting-started/installation/"
},
{
label: "Translation files",
link: "/getting-started/translation-files/"
},
{
label: "Translating your components",
link: "/getting-started/translating-your-components/"
},
{
label: "Migration guide",
link: "/getting-started/migration-guide/"
}
]
}, {
label: 'Reference',
items: [
{
label: "Concepts",
link: "/reference/concepts/"
},
{
label: "Configuration",
link: "/reference/configuration/"
},
{
label: "TranslateService API",
link: "/reference/translate-service-api/"
},
{
label: "TranslateLoader API",
link: "/reference/translate-loader-api/"
},
{
label: "TranslateCompiler API",
link: "/reference/translate-compiler-api/"
},
{
label: "TranslateParser API",
link: "/reference/translate-parser-api/"
},
{
label: "MissingTranslationHandler API",
link: "/reference/missing-translation-handler-api/"
},
{
label: "Using NgModules",
link: "/reference/ngmodules/"
},
]
}, {
label: 'Recipes',
autogenerate: {
directory: '30-recipes'
}
}, {
label: 'Resources',
autogenerate: {
directory: '40-resources'
}
}],
plugins: [
starlightLinksValidator({exclude: ["/"] }),
starlightVersions({
current: {
label: "v17"
},
versions: [
{
slug: 'v16',
label: 'v16',
redirect: "root",
},
{
slug: 'v15',
label: 'v15',
redirect: "root",
},
],
}),
],
logo: {
src: "./src/assets/ngx-translate.svg"
},
favicon: "/images/favicon.svg",
head: [
// ICO-Favicon als Fallback für Safari hinzufügen
{
tag: 'link',
attrs: {
rel: 'icon',
href: "/images/favicon.ico",
sizes: '32x32',
},
},
],
components: {
PageFrame: "./src/components/PageFrameWithFooter.astro",
Banner: "./src/components/CawBanner.astro",
PageSidebar: "./src/components/PageSidebar.astro",
},
editLink: {
baseUrl: 'https://github.com/CodeAndWeb/ngx-translate.org/edit/main/',
},
customCss: ['./src/styles/global.css'],
})
],
vite: {
plugins: [tailwindcss()],
},
})
;