My personal website export process
The export process copies content from my Obsidian vault to an intermediate export directory, applying privacy rules and transforming content for web publishing.
Folder Structure
Source: /Users/joel/Obsidian Vaults/Notes
Destination: /Users/joel/Code/digital-garden-python-export
Content Types and Mappings
| Content Type | Vault Source Path(s) | Export Destination |
|---|---|---|
| notes | topic/evergreen |
notes/ |
| spaces | spaces/ |
spaces/ |
| clippings | clippings/articles, clippings/books, clippings/quotes, clippings/poems, clippings/ai chats |
clippings/ |
| articles | website/articles |
website/articles |
| newsletters | website/newsletters |
website/newsletters |
| pages | website/pages |
website/pages |
| posts | website/posts |
website/posts |
Algorithm
- Process each content type - iterate through configured vault paths
- Check privacy rules for each markdown file:
- Default: public, except for
clippings/ai chatsandspacesdirectories garden_private:in frontmatter → exclude from exportgarden_public:in frontmatter → include in export (overrides directory default)
- Default: public, except for
- Process assets - find image references in content:
- Obsidian-style:
<img class="" src="/cdn-cgi/imagedelivery/8UsJNwl0JNE30EmncpA2bw/assets/image.jpg/public" alt=""> - Standard markdown:
<img class="" src="/cdn-cgi/imagedelivery/8UsJNwl0JNE30EmncpA2bw/assets/image.jpg/public" alt="alt"> - Copy referenced assets from vault's
assets/folder to export'sassets/folder
- Obsidian-style:
- Transform image syntax - convert to Eleventy shortcode format:
<img class="" src="/cdn-cgi/imagedelivery/8UsJNwl0JNE30EmncpA2bw/assets/image.jpg/public" alt="">→<img class="" src="/cdn-cgi/imagedelivery/8UsJNwl0JNE30EmncpA2bw/assets/image.jpg/public" alt="">
- Flatten structure - files are exported using just their filename (no subdirectory hierarchy preserved)
- Sync changes - track new, modified, and deleted files; only write changed content
- Output summary - report counts of new, modified, deleted files and copied assets
Privacy Logic
The get_directory_public_default() function determines default visibility:
clippings/ai chats→ private by defaultspaces→ private by default- All other directories → public by default
Frontmatter properties override the default.
Links to this note
My personal website build process
Up: § My personal website The build process takes exported content and prepares it for the Eleventy static site generator, reorgan…
My personal website
Up: § My note taking system This is an Outline Note documenting how my personal website (digital garden) is built and deployed fro…