sudovanilla-website/astro.config.mjs

67 lines
2.2 KiB
JavaScript
Raw Normal View History

2024-05-17 01:10:52 -05:00
import { defineConfig } from 'astro/config'
import react from '@astrojs/react'
import markdoc from '@astrojs/markdoc'
import AutoImport from 'astro-auto-import'
import keystatic from '@keystatic/astro'
2024-05-13 22:34:06 -05:00
import node from '@astrojs/node'
import robotsTxt from 'astro-robots-txt'
2024-05-17 01:10:52 -05:00
import mdx from '@astrojs/mdx'
import matomo from 'astro-matomo'
2024-05-13 22:34:06 -05:00
// https://astro.build/config
export default defineConfig({
site: 'https://sudovanilla.org',
trailingSlash: 'always', // Slug issue if not enabled
redirects: {
'/docs/': '/docs/minpluto/introduction/',
'/docs/minpluto': '/docs/minpluto/introduction/' // ?
},
2024-05-15 11:09:16 -05:00
integrations: [react(), markdoc(), ...(process.env.SKIP_KEYSTATIC ? [] : [keystatic()]),
2024-05-13 22:34:06 -05:00
AutoImport({
imports: [
'./src/components/keystatic/Image.astro',
'./src/components/init/SoftwareItem.astro',
],
}),
mdx(), // This must initalzied after AutoImport, not before
2024-05-17 01:10:52 -05:00
matomo({
enabled: import.meta.env.PROD, // Only load in production
host: "https://stats.sudovanilla.org/",
setCookieDomain: "*.sudovanilla.org",
trackerUrl: "js/", // defaults to matomo.php
srcUrl: "js/", // defaults to matomo.js
siteId: 1,
heartBeatTimer: 5,
disableCookies: true,
debug: false,
}),
2024-05-13 22:34:06 -05:00
robotsTxt({
policy: [
{ userAgent: 'Googlebot', disallow: '/' },
{ userAgent: 'Bingbot', disallow: '/' },
{ userAgent: '404checker', disallow: '/' },
{ userAgent: 'MJ12Bot', disallow: '/' },
{ userAgent: 'AspiegelBot', disallow: '/' },
{ userAgent: 'PetalBot', disallow: '/' },
{ userAgent: 'AhrefsBot', disallow: '/' },
{ userAgent: 'SEMrushBot', disallow: '/' },
{ userAgent: 'DotBot', disallow: '/' },
{ userAgent: 'Slurp', disallow: '/' },
{ userAgent: 'DuckDuckBot', disallow: '/' },
{ userAgent: 'YandexBot', disallow: '/' },
{ userAgent: 'MauiBot', disallow: '/' },
{ userAgent: 'baiduspider', disallow: '/' },
{ userAgent: 'adidxbot', disallow: '/' },
{ userAgent: 'microsoftbot', disallow: '/' },
{ userAgent: 'OtherBot', disallow: '/' },
]
})],
output: 'server',
adapter: node({
mode: 'standalone',
}),
server: {
port: 2014,
host: true
}
2024-05-17 01:10:52 -05:00
})