mirror of
https://github.com/morten-olsen/morten-olsen.github.io.git
synced 2026-02-08 01:46:28 +01:00
30 lines
680 B
TypeScript
30 lines
680 B
TypeScript
import { defineConfig } from 'astro/config'
|
|
import mdx from '@astrojs/mdx'
|
|
import sitemap from '@astrojs/sitemap'
|
|
import icon from 'astro-icon'
|
|
import compress from 'astro-compress'
|
|
import robotsTxt from 'astro-robots-txt'
|
|
const getSiteInfo = () => {
|
|
const siteUrl = process.env.SITE_URL
|
|
if (!siteUrl) {
|
|
return {}
|
|
}
|
|
const url = new URL(siteUrl)
|
|
return {
|
|
site: `${url.protocol}//${url.host}`,
|
|
base: url.pathname
|
|
}
|
|
}
|
|
|
|
// https://astro.build/config
|
|
export default defineConfig({
|
|
...getSiteInfo(),
|
|
output: 'static',
|
|
integrations: [mdx(), sitemap(), icon(), compress(), robotsTxt()],
|
|
vite: {
|
|
build: {
|
|
assetsInlineLimit: 1024 * 10
|
|
}
|
|
}
|
|
})
|