Use unified, add header ids

This commit is contained in:
Endeavorance 2025-05-27 17:00:12 -04:00
parent 5c6ef03082
commit 6f4b2d20da
7 changed files with 271 additions and 6 deletions

View file

@ -10,6 +10,7 @@ import defaultTemplate from "./defaults/default-template.html" with {
};
import { CLIError } from "./error";
import type { BunFile } from "bun";
import { parseMarkdown } from "./markdown";
const DEFAULT_TEMPLATE_FILE = "_template.html";
const DEFAULT_STYLESHEET_FILE = "_style.css";
@ -155,9 +156,7 @@ async function buildFile(
content: string;
};
const html = await marked.parse(content, {
gfm: true,
});
const html = await parseMarkdown(content);
const title = [options.title, props.title].find((t) => t) || "Untitled";