Migrate to Sätteri md renderer
This commit is contained in:
+11
-7
@@ -1,10 +1,9 @@
|
|||||||
import { defineConfig, fontProviders } from "astro/config";
|
import { defineConfig, fontProviders } from "astro/config";
|
||||||
import { unified } from '@astrojs/markdown-remark';
|
import { satteri } from '@astrojs/markdown-satteri';
|
||||||
import icon from "astro-icon";
|
import icon from "astro-icon";
|
||||||
import mdx from "@astrojs/mdx";
|
import mdx from "@astrojs/mdx";
|
||||||
import remarkMath from "remark-math";
|
import satteriCallouts from "satteri-callouts"
|
||||||
import rehypeMathjax from "rehype-mathjax"
|
import { satteriKatex } from "satteri-katex";
|
||||||
import rehypeCallouts from "rehype-callouts";
|
|
||||||
import mermaid from "astro-mermaid";
|
import mermaid from "astro-mermaid";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
@@ -29,9 +28,14 @@ export default defineConfig({
|
|||||||
mdx()
|
mdx()
|
||||||
],
|
],
|
||||||
markdown: {
|
markdown: {
|
||||||
processor: unified({
|
processor: satteri({
|
||||||
remarkPlugins: [remarkMath],
|
features: {
|
||||||
rehypePlugins: [rehypeMathjax, [rehypeCallouts, { theme: "obsidian" }]],
|
math: true,
|
||||||
|
rawHtml: true,
|
||||||
|
smartPunctuation: true,
|
||||||
|
},
|
||||||
|
mdastPlugins: [satteriKatex()],
|
||||||
|
hastPlugins: [satteriCallouts({theme: "obsidian"})],
|
||||||
}),
|
}),
|
||||||
shikiConfig: {
|
shikiConfig: {
|
||||||
theme: "one-dark-pro",
|
theme: "one-dark-pro",
|
||||||
|
|||||||
Generated
+303
-1906
File diff suppressed because it is too large
Load Diff
+4
-5
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "c0ntroller.de",
|
"name": "c0ntroller.de",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "1.0.1",
|
"version": "1.1.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=22.12.0"
|
"node": ">=22.12.0"
|
||||||
},
|
},
|
||||||
@@ -12,7 +12,6 @@
|
|||||||
"astro": "astro"
|
"astro": "astro"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/markdown-remark": "^7.3.0",
|
|
||||||
"@astrojs/mdx": "^8.0.0",
|
"@astrojs/mdx": "^8.0.0",
|
||||||
"@iconify-json/lucide": "^1.2.98",
|
"@iconify-json/lucide": "^1.2.98",
|
||||||
"@iconify-json/simple-icons": "^1.2.74",
|
"@iconify-json/simple-icons": "^1.2.74",
|
||||||
@@ -21,9 +20,9 @@
|
|||||||
"astro-icon": "^1.1.5",
|
"astro-icon": "^1.1.5",
|
||||||
"astro-mermaid": "^2.1.0",
|
"astro-mermaid": "^2.1.0",
|
||||||
"mermaid": "^11.17.2",
|
"mermaid": "^11.17.2",
|
||||||
"rehype-callouts": "^2.1.2",
|
"satteri-callouts": "^1.0.1",
|
||||||
"rehype-mathjax": "^7.1.0",
|
"satteri-katex": "^0.1.1",
|
||||||
"remark-math": "^6.0.0"
|
"satteri-mathjax": "^0.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"sharp": "^0.35.4"
|
"sharp": "^0.35.4"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { getCollection, render } from 'astro:content';
|
|||||||
import BaseLayout from '../../layouts/BaseLayout.astro';
|
import BaseLayout from '../../layouts/BaseLayout.astro';
|
||||||
import "katex/dist/katex.min.css";
|
import "katex/dist/katex.min.css";
|
||||||
// @ts-expect-error Theme is not provided as ".css"
|
// @ts-expect-error Theme is not provided as ".css"
|
||||||
import "rehype-callouts/theme/obsidian";
|
import "satteri-callouts/theme/obsidian";
|
||||||
|
|
||||||
export async function getStaticPaths() {
|
export async function getStaticPaths() {
|
||||||
const blogEntries = await getCollection('blog');
|
const blogEntries = await getCollection('blog');
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import BaseLayout from '../../layouts/BaseLayout.astro';
|
|||||||
import BookNavigation from '../../components/BookNavigation.astro';
|
import BookNavigation from '../../components/BookNavigation.astro';
|
||||||
import "katex/dist/katex.min.css";
|
import "katex/dist/katex.min.css";
|
||||||
// @ts-expect-error Theme is not provided as ".css"
|
// @ts-expect-error Theme is not provided as ".css"
|
||||||
import "rehype-callouts/theme/obsidian";
|
import "satteri-callouts/theme/obsidian";
|
||||||
import "../../styles/md-custom.css";
|
import "../../styles/md-custom.css";
|
||||||
|
|
||||||
export async function getStaticPaths() {
|
export async function getStaticPaths() {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { Icon } from "astro-icon/components";
|
|||||||
import BaseLayout from '../../layouts/BaseLayout.astro';
|
import BaseLayout from '../../layouts/BaseLayout.astro';
|
||||||
import "katex/dist/katex.min.css";
|
import "katex/dist/katex.min.css";
|
||||||
// @ts-expect-error Theme is not provided as ".css"
|
// @ts-expect-error Theme is not provided as ".css"
|
||||||
import "rehype-callouts/theme/obsidian";
|
import "satteri-callouts/theme/obsidian";
|
||||||
|
|
||||||
export async function getStaticPaths() {
|
export async function getStaticPaths() {
|
||||||
const portfolioEntries = await getCollection('portfolio');
|
const portfolioEntries = await getCollection('portfolio');
|
||||||
|
|||||||
Reference in New Issue
Block a user