Obsidian Digital Garden

Obsidian Digital Garden

How notes from this vault become the site at https://triphan2k3.github.io.

Architecture

flowchart LR
    subgraph Obsidian["Obsidian vault (source of truth)"]
        Notes["Notes, CSV tables
+ attachments"] end Notes <-- "Anki CSV Sync plugin
(AnkiConnect)" --> Anki["Anki
decks for review"] Notes -- "Digital Garden plugin
(GitHub API)" --> Repo["GitHub repo
triphan2k3.github.io"] Repo -- "GitHub Actions
deploy.yml" --> Pages["GitHub Pages
triphan2k3.github.io"] Notes -. "obsidian-git" .-> Backup["GitHub repo
triphan2k3/obsidian"]

Everything is written once, in Obsidian. Anki can also send cards back (pull), but the site only receives copies.

Obsidian

Anki

GitHub Pages

How it works

  1. The Digital Garden plugin compiles marked notes and commits them to the GitHub repo triphan2k3/triphan2k3.github.io (branch master).
  2. Notes land in src/site/notes/, images in src/site/img/user/.
  3. Every push to master runs the GitHub Actions workflow deploy.yml, which builds the site with Eleventy and deploys it to GitHub Pages. The site is live about a minute later.
Important

Publish content from Obsidian only. Don't edit src/site/notes/ in the repo by hand; the plugin owns it.

Publishing a note

  1. Add dg-publish: true to the note's properties (or run Digital Garden: Add publish flag).
  2. Run Digital Garden: Open Publication Center.
  3. Check the lists of new, changed and deleted notes, then click Publish.

To take a note down, set dg-publish: false (or remove it) and publish again. The note shows up under deleted notes.

Note properties

Property Effect
dg-publish: true Publish the note
dg-home: true Make it the home page (only one note). Currently this note
dg-hide-in-filetree: true Keep the page, but hide it from the sidebar
dg-hide: true Hide from the sidebar and the graph
dg-hide-in-graph: true Hide from the graph only
dg-pinned: true Pin to the top of its folder in the sidebar
dg-permalink: my-url Custom URL instead of the folder path
dg-path: Folder/Name Show the note at a different path in the site
title: ... Title shown on the page and in the sidebar

URLs come from the vault path, lowercased with dashes: 21. Application/Cube/PLL/PLL T.md becomes /21-application/cube/pll/pll-t/. Moving or renaming a note changes its URL.

What gets converted

Canvas

A canvas has no properties panel, so the flag goes inside the .canvas file (edit it as text, e.g. in VS Code):

"metadata": {
	"frontmatter": {
		"dg-publish": true
	}
}

Put it next to "nodes" and "edges", then publish from the Publication Center. The page is zoomable and its URL ends in .canvas/.

Look and settings

Repo notes