Syntax cheatsheet#

What the sync script does with Obsidian-flavoured markdown.

In the vaultOn the site
[[How this works]]link to that page
[[How this works|custom text]]link with your label
[[How this works#The vault]]link to that heading
[[#Links]]link inside the same page
[[Half-baked idea]] (unpublished)plain text, plus a warning
[[Nonexistent]]plain text, plus a warning

Links to unpublished notes degrade to plain text rather than breaking the build. Run make check to turn those warnings into a failure instead.

Attachments#

![[Pipeline diagram.png]] embeds an image; [[report.pdf]] links a file. The file is copied next to the generated page, so it works under any baseURL.

Callouts#

Callouts map onto Hugo alerts

Obsidian’s callout syntax is the same as GitHub’s alert syntax, which Hugo parses natively. Types Obsidian knows but hugo-book has no colour for (abstract, question, bug, …) are folded onto the nearest one.

A callout with no title works too.

Front matter#

KeyEffect
publish: truerequired, unless you run the script with --publish-mode all
title:page title; falls back to the filename
date:falls back to the file’s modification time
weight:orders the sidebar menu
tags:passed through to Hugo
aliases:used to resolve wikilinks, then dropped

aliases is dropped on purpose: in Obsidian it means “other names for this note”, in Hugo it means “URLs that redirect here”. Passing them through would mint URLs like /docs/Start%20here/.

Left alone#

Fenced code blocks, inline code, math, HTML, and anything the script does not recognise pass through untouched. Obsidian comments %% like this %% and block ids (^abc123) are stripped.