forked from javelina-works/javelina-works.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathastro.config.mjs
More file actions
105 lines (93 loc) · 2.7 KB
/
Copy pathastro.config.mjs
File metadata and controls
105 lines (93 loc) · 2.7 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
import mdx from "@astrojs/mdx";
import remarkToc from "remark-toc";
import sitemap from "@astrojs/sitemap";
import AutoImport from "astro-auto-import";
import { defineConfig } from "astro/config";
import tailwindcss from "@tailwindcss/vite";
import fontsJson from "./src/config/fonts.json";
import rehypeExternalLinks from "rehype-external-links";
import { enabledLanguages } from "./src/lib/utils/i18nUtils.ts";
import remarkParseContent from "./src/lib/utils/remarkParseContent.ts";
import config from "./.astro/config.generated.json";
import { generateAstroFontsConfig } from "./src/lib/utils/AstroFont.ts";
import netlify from "@astrojs/netlify";
import sentry from "@sentry/astro";
const fonts = generateAstroFontsConfig(fontsJson);
let {
seo: { sitemap: sitemapConfig },
settings: {
multilingual: { showDefaultLangInUrl, defaultLanguage },
},
} = config;
// https://astro.build/config
export default defineConfig({
site: config.site.baseUrl ? config.site.baseUrl : "http://javelinaworks.com",
trailingSlash: config.site.trailingSlash ? "always" : "never",
image: {
layout: "constrained",
},
fonts,
i18n: {
locales: enabledLanguages,
defaultLocale: defaultLanguage,
routing: {
prefixDefaultLocale: showDefaultLangInUrl,
},
},
integrations: [sitemapConfig.enable ? sitemap() : null, AutoImport({
imports: [
"@/components/CustomButton.astro",
"@/shortcodes/Accordion.astro",
"@/shortcodes/Notice.astro",
"@/shortcodes/Tabs.astro",
"@/shortcodes/Tab.astro",
"@/shortcodes/Testimonial.astro",
"@/shortcodes/CardGrid.astro",
"@/shortcodes/ImageList.astro",
"@/shortcodes/ImageItem.astro",
"@/shortcodes/Card.astro",
"@/shortcodes/VideoInline.astro",
],
}),
mdx(),
sitemap(),
sentry({
sourceMapsUploadOptions: {
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
sourcemaps: {
assets: ['./dist/**/*.js', './dist/**/*.js.map'],
},
},
}),
],
markdown: {
rehypePlugins: [
[
rehypeExternalLinks,
{
rel: "noopener noreferrer nofollow",
target: "_blank",
},
],
],
remarkPlugins: [
remarkParseContent, // Parse markdown content and add classes in heading and loading="lazy" to images
remarkToc,
],
// Code Highlighter https://github.com/shikijs/shiki
shikiConfig: {
theme: "light-plus", // https://shiki.style/themes
wrap: false,
},
extendDefaultPlugins: true,
},
vite: {
plugins: [tailwindcss()],
build: {
sourcemap: 'hidden',
},
},
adapter: netlify(),
});