From c6ecdd6432f0f2a9398884a26d4543a8aaca82f3 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Sat, 2 Aug 2025 22:55:34 -0700 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20(config):=20enhance=20Markdown=20co?= =?UTF-8?q?nfiguration=20for=20Obsidian=20compatibility=20with=20Goldmark?= =?UTF-8?q?=20extensions=20and=20math=20rendering?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.toml | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/config.toml b/config.toml index abbf8fa..681daa6 100644 --- a/config.toml +++ b/config.toml @@ -16,9 +16,72 @@ enableRobotsTXT = true [services.disqus] shortname = "ericxliu-me" +# Goldmark configuration for Obsidian compatibility +[markup] + defaultMarkdownHandler = "goldmark" + + [markup.goldmark] + [markup.goldmark.extensions] + # Enable definition lists (useful for Obsidian-style definitions) + definitionList = true + # Enable footnotes (common in Obsidian) + footnote = true + # Enable linkification + linkify = true + # Enable strikethrough + strikethrough = true + # Enable tables + table = true + # Enable task lists (checkboxes) + taskList = true + # Enable typographer for better typography + [markup.goldmark.extensions.typographer] + disable = false + # Enable math via passthrough for LaTeX + [markup.goldmark.extensions.passthrough] + enable = true + [markup.goldmark.extensions.passthrough.delimiters] + # Block math delimiters + block = [["$$", "$$"], ["\\[", "\\]"]] + # Inline math delimiters + inline = [["$", "$"], ["\\(", "\\)"]] + # Enable extra extensions for better compatibility + [markup.goldmark.extensions.extras] + [markup.goldmark.extensions.extras.subscript] + enable = true + [markup.goldmark.extensions.extras.superscript] + enable = true + [markup.goldmark.extensions.extras.mark] + enable = true + [markup.goldmark.extensions.extras.insert] + enable = true + [markup.goldmark.extensions.extras.delete] + enable = true + + [markup.goldmark.parser] + # Enable attributes for better styling + [markup.goldmark.parser.attribute] + block = true + title = true + # Auto-generate heading IDs + autoHeadingID = true + autoHeadingIDType = "github" + # Don't wrap standalone images in paragraphs (better for Obsidian compatibility) + wrapStandAloneImageWithinParagraph = false + + [markup.goldmark.renderer] + # Allow unsafe HTML (needed for some Obsidian features) + unsafe = true + [markup.highlight] style = "github-dark" +# Table of contents configuration (compatible with Obsidian heading structure) +[markup.tableOfContents] + startLevel = 1 + endLevel = 6 + ordered = false + [params] # theme parameters author = "Eric X. Liu" info = "Software & Performance Engineer @Google" @@ -42,6 +105,9 @@ style = "github-dark" # Custom JS custom_js = [] + + # Enable math rendering (for LaTeX support including $$$$ blocks) + math = true # Add new SEO-related parameters [params.seo]