(((meta ((content . "Use Markdown within Zettelstore") (name . "title"))) (meta ((content . "manual") (name . "role"))) (meta ((content . "#manual #markdown #zettelstore") (name . "tags"))) (meta ((content . "zmk") (name . "syntax"))) (meta ((content . "00001007000000 00001007040324 00001008000000 00001012920522") (name . "back"))) (meta ((content . "00001007000000 00001007040324 00001008000000 00001012920522") (name . "backward"))) (meta ((content . "1") (name . "box-number"))) (meta ((content . "(c) 2020-present by Detlef Stern ") (name . "copyright"))) (meta ((content . "20210126175322") (name . "created"))) (meta ((content . "00000000090001 00001008010500 00001008010800 00001012920500 00001012920510") (name . "forward"))) (meta ((content . "en") (name . "lang"))) (meta ((content . "EUPL-1.2-or-later") (name . "license"))) (meta ((content . "20260630174914") (name . "modified"))) (meta ((content . "20260630174914") (name . "published"))) (meta ((content . "public") (name . "visibility")))) (p "If you prefer Markdown as your markup language, you can configure Zettelstore accordingly." " " "Zettelstore supports the " (a ((href . "00001008010500")) "CommonMark") " dialect of Markdown, as well as an extended dialect, " (a ((href . "00001008010800")) "Extended CommonMark") ".") (p "The " (a ((href . "00001006020000#syntax")) (kbd "syntax")) " metadata of a zettel determines which Markdown dialect is used:") (dl (dt (@L (@H "“") "commonmark" (@H "”")) ", " (@L (@H "“") "cmark" (@H "”"))) (dd (p "Uses the " (a ((href . "00001008010500")) "CommonMark") " dialect.")) (dt (@L (@H "“") "emark" (@H "”"))) (dd (p "Uses the " (a ((href . "00001008010800")) "Extended CommonMark") " dialect.")) (dt (@L (@H "“") "markdown" (@H "”")) ", " (@L (@H "“") "md" (@H "”"))) (dd (p "The value of the " (a ((href . "00001004020000#markdown-dialect")) (kbd "markdown-dialect")) " configuration setting determines whether CommonMark or Extended CommonMark is used."))) (h2 ((id . "use-markdown-as-the-default-markup-language-of-zettelstore")) "Use Markdown as the default markup language of Zettelstore") (p "Update the " (a ((href . "00000000090001")) "New Zettel") " template (and other relevant template zettel) by setting the syntax value to " (@L (@H "“") "md" (@H "”")) ", " (@L (@H "“") "markdown" (@H "”")) ", " (@L (@H "“") "commonmark" (@H "”")) ", " (@L (@H "“") "cmark" (@H "”")) ", " (@L (@H "“") "emark" (@H "”")) "." " " "Whether to use " (@L (@H "“") "md" (@H "”")) " or " (@L (@H "“") "markdown" (@H "”")) " is not just a matter of taste." " " "The same applies for " (@L (@H "“") "commonmark" (@H "”")) " / " (@L (@H "“") "cmark" (@H "”")) "." " " "It also depends on the value of " (a ((href . "00001004020000#zettel-file-syntax")) (kbd "zettel-file-syntax")) " and, to some extent, on the value of " (a ((href . "00001004020000#yaml-header")) (kbd "yaml-header")) ".") (p "If you set " (kbd "yaml-header") " to true, then new content is always stored in a file with the extension " (kbd ".zettel") ".") (p "Otherwise " (kbd "zettel-file-syntax") " lists all syntax values, where its content should be stored in a file with the extension " (kbd ".zettel") ".") (p "If neither " (kbd "yaml-header") " nor " (kbd "zettel-file-syntax") " is set, new content is stored in a file whose filename extension matches the zettel's " (kbd "syntax") " metadata value." " " "In this case, it makes a difference whether you specify " (@L (@H "“") "md" (@H "”")) " or " (@L (@H "“") "markdown" (@H "”")) ", and likewise whether you specify " (@L (@H "“") "commonmark" (@H "”")) " or " (@L (@H "“") "cmark" (@H "”")) "." " " "If you specify the " (kbd "syntax") " metadata value " (@L (@H "“") "md" (@H "”")) ", your content is stored in a file with the " (kbd ".md") " extension." " " "The same applies to the values " (@L (@H "“") "markdown" (@H "”")) ", " (@L (@H "“") "commonmark" (@H "”")) ", " (@L (@H "“") "cmark" (@H "”")) ", and " (@L (@H "“") "emark" (@H "”")) ".") (p "If you want to process the files that store the zettel content, e.g. with some other Markdown tools, this may be important." " " "Not every Markdown tool allows both file extensions.") (p "BTW, metadata is stored in a file without a file extension, if neither " (kbd "yaml-header") " nor " (kbd "zettel-file-syntax") " is set.") (h2 ((id . "security-aspects")) "Security aspects") (p "You should be aware that Markdown is a super-set of HTML." " " "The body of any HTML document is also a valid Markdown document." " " "If you write your own zettel, this is probably not a problem.") (p "However, if you receive zettel from others, you should be careful." " " "An attacker might include malicious HTML code in your zettel." " " "For example, HTML allows embedding JavaScript, a full-featured programming language that drives many websites." " " "When a zettel is displayed, JavaScript code might be executed, sometimes with harmful results.") (p "By default, Zettelstore prohibits any HTML content." " " "If you want to relax this rule, you should take a look at the startup configuration key " (a ((href . "00001004010000#insecure-html")) (kbd "insecure-html")) ".") (p "Even if you have allowed HTML content, Zettelstore mitigates some of the security problems by ignoring suspicious text when it encodes a zettel as HTML." " " "Any HTML text that might contain the " (code "