ld-site/astro.config.mjs
liding 05c1b0d29b Add remark-toc plugin.
Add plugin for generating table of content automatically for markdown files.
2024-06-30 09:12:43 +08:00

47 lines
1.4 KiB
JavaScript

import { defineConfig } from 'astro/config';
import sitemap from "@astrojs/sitemap";
import vue from "@astrojs/vue";
import remarkToc from 'remark-toc';
// https://astro.build/config
export default defineConfig({
markdown: {
smartypants: false,
syntaxHighlight: 'shiki',
shikiConfig: {
// Choose from Shiki's built-in themes (or add your own)
// https://shiki.style/themes
theme: 'github-light',
// Alternatively, provide multiple themes
// See note below for using dual light/dark themes
themes: {
light: 'github-light',
dark: 'github-dark'
},
// Add custom languages
// Note: Shiki has countless langs built-in, including .astro!
// https://shiki.style/languages
langs: [],
// Enable word wrap to prevent horizontal scrolling
wrap: false,
// Add custom transformers: https://shiki.style/guide/transformers
// Find common transformers: https://shiki.style/packages/transformers
transformers: []
},
remarkPlugins: [
[remarkToc, { heading: "(table[ -]of[ -])?contents?|toc|目录" }]
],
},
site: 'https://lishouzhong.com',
integrations: [
sitemap({
// entryLimit: 10000,
// customPages: [],
// filter: (page) => { },
// lastmod: new Date('2022-02-24'),
// serialize(item) {
// return item;
// }
}),
vue()]
});