mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-16 03:32:51 +02:00
initial environment setup
This commit is contained in:
commit
9d2be2a82e
15 changed files with 13276 additions and 0 deletions
77
astro.config.ts
Normal file
77
astro.config.ts
Normal file
|
@ -0,0 +1,77 @@
|
|||
import mdx from '@astrojs/mdx'
|
||||
import sitemap from '@astrojs/sitemap'
|
||||
import swup from '@swup/astro'
|
||||
import compress from 'astro-compress'
|
||||
import robotsTxt from 'astro-robots-txt'
|
||||
import { defineConfig } from 'astro/config'
|
||||
import rehypeAutolinkHeadings from 'rehype-autolink-headings'
|
||||
import rehypeKatex from 'rehype-katex'
|
||||
import rehypeSlug from 'rehype-slug'
|
||||
import remarkMath from 'remark-math'
|
||||
import UnoCSS from 'unocss/astro'
|
||||
import { themeConfig } from './src/config'
|
||||
|
||||
export default defineConfig({
|
||||
site: themeConfig.site.url,
|
||||
base: '/',
|
||||
trailingSlash: 'always', // whether the URL ends with a slash
|
||||
markdown: {
|
||||
remarkPlugins: [remarkMath],
|
||||
rehypePlugins: [
|
||||
rehypeKatex,
|
||||
rehypeSlug,
|
||||
[rehypeAutolinkHeadings, {
|
||||
behavior: 'append',
|
||||
properties: {
|
||||
className: ['anchor'],
|
||||
},
|
||||
content: {
|
||||
type: 'element',
|
||||
tagName: 'span',
|
||||
properties: {
|
||||
'className': ['anchor-icon'],
|
||||
'data-pagefind-ignore': true,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
type: 'text',
|
||||
value: '#',
|
||||
},
|
||||
],
|
||||
},
|
||||
}],
|
||||
],
|
||||
shikiConfig: {
|
||||
theme: 'github-dark',
|
||||
wrap: true,
|
||||
},
|
||||
},
|
||||
integrations: [
|
||||
UnoCSS({
|
||||
injectReset: true,
|
||||
}),
|
||||
mdx(),
|
||||
sitemap(),
|
||||
robotsTxt(),
|
||||
compress({
|
||||
CSS: true,
|
||||
HTML: true,
|
||||
Image: true,
|
||||
JavaScript: true,
|
||||
SVG: true,
|
||||
}),
|
||||
swup({
|
||||
theme: false,
|
||||
animationClass: 'transition-swup-',
|
||||
cache: true,
|
||||
preload: true,
|
||||
accessibility: true,
|
||||
smoothScrolling: true,
|
||||
updateHead: true,
|
||||
updateBodyClass: true,
|
||||
}),
|
||||
],
|
||||
devToolbar: {
|
||||
enabled: false,
|
||||
},
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue