Links in markdown headings, corrected date

This commit is contained in:
DarkCat09 2023-06-18 18:55:51 +04:00
parent 8849d70735
commit 70b0893df8
5 changed files with 188 additions and 39 deletions

View file

@ -2,6 +2,9 @@ import { defineConfig } from 'astro/config';
import compress from "astro-compress";
import remarkUnwrapImages from 'remark-unwrap-images';
import { rehypeHeadingIds } from '@astrojs/markdown-remark';
import rehypeSlug from 'rehype-slug';
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
// https://astro.build/config
export default defineConfig({
@ -12,5 +15,13 @@ export default defineConfig({
markdown: {
syntaxHighlight: "shiki",
remarkPlugins: [remarkUnwrapImages],
rehypePlugins: [
rehypeSlug,
rehypeHeadingIds,
[
rehypeAutolinkHeadings,
{ behavior: "append" },
],
],
},
});