mirror of
https://github.com/apophenia-news/apophenia.news.git
synced 2026-09-18 05:25:43 +00:00
Feat: Enable KaTeX math rendering in marked
Co-authored-by: gemini-3.7-flash <noreply@google.com>
This commit is contained in:
@@ -3,11 +3,13 @@ import path from "node:path";
|
||||
import fg from "fast-glob";
|
||||
import matter from "gray-matter";
|
||||
import { marked } from "marked";
|
||||
import markedKatex from "marked-katex-extension";
|
||||
import { ARTICLES_GLOB, AUTHOR_PAGES, ROOT, SRC, UNLISTED_PATH } from "./lib/constants.mjs";
|
||||
import { fixInternalLinks } from "./lib/utils.mjs";
|
||||
import { renderArticle, renderHome, renderWritePage, renderNewsletterPage, renderAuthorPage } from "./lib/renderers.mjs";
|
||||
import { ensureCleanGenerated, writeDiscoveryFiles, writePage } from "./lib/io.mjs";
|
||||
|
||||
marked.use(markedKatex({ throwOnError: false, nonStandard: true }));
|
||||
marked.setOptions({ breaks: true, gfm: true });
|
||||
|
||||
const getUnlistedSlugs = async () => {
|
||||
|
||||
Reference in New Issue
Block a user