✨ (config): enhance Markdown configuration for Obsidian compatibility with Goldmark extensions and math rendering
Some checks are pending
Hugo Publish CI / build-and-deploy (push) Waiting to run
Some checks are pending
Hugo Publish CI / build-and-deploy (push) Waiting to run
This commit is contained in:
66
config.toml
66
config.toml
@@ -16,9 +16,72 @@ enableRobotsTXT = true
|
|||||||
[services.disqus]
|
[services.disqus]
|
||||||
shortname = "ericxliu-me"
|
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]
|
[markup.highlight]
|
||||||
style = "github-dark"
|
style = "github-dark"
|
||||||
|
|
||||||
|
# Table of contents configuration (compatible with Obsidian heading structure)
|
||||||
|
[markup.tableOfContents]
|
||||||
|
startLevel = 1
|
||||||
|
endLevel = 6
|
||||||
|
ordered = false
|
||||||
|
|
||||||
[params] # theme parameters
|
[params] # theme parameters
|
||||||
author = "Eric X. Liu"
|
author = "Eric X. Liu"
|
||||||
info = "Software & Performance Engineer @Google"
|
info = "Software & Performance Engineer @Google"
|
||||||
@@ -42,6 +105,9 @@ style = "github-dark"
|
|||||||
|
|
||||||
# Custom JS
|
# Custom JS
|
||||||
custom_js = []
|
custom_js = []
|
||||||
|
|
||||||
|
# Enable math rendering (for LaTeX support including $$$$ blocks)
|
||||||
|
math = true
|
||||||
|
|
||||||
# Add new SEO-related parameters
|
# Add new SEO-related parameters
|
||||||
[params.seo]
|
[params.seo]
|
||||||
|
Reference in New Issue
Block a user