Publish your personal content websites directly from Obsidian.
Draft42 is a publishing platform for personal websites. This plugin lets you write and manage your content in Obsidian, then publish it to your Draft42 sites with a single command.
- Preview & publish — See your post on your site before going live
- Custom domains — Your own domain with automatic SSL and redirects
- Theming — Fonts, colors, light/dark mode, upload custom fonts
- SEO-ready — Server-rendered content, meta/og tags, clean URLs
- Image optimization — CDN delivery and state-of-the-art placeholders
- Deep linking — Block IDs for linking to any content block
- [coming soon] Multi-site support
- [coming soon] Documentation sites
- [coming soon] More modules: photo galleries, etc.
- Obsidian v1.11.4 or higher
- A Draft42 account
The plugin is pending approval in the community plugins directory.
Since the plugin is not yet available in the community plugins directory, you can install it using BRAT, a community plugin manager for beta testing:
- Install BRAT from Community plugins
- Run command:
BRAT: Plugins: Add a beta plugin for testing - Enter
Draft42HQ/draft42-obsidian-plugin
- Download
main.js,styles.css, andmanifest.jsonfrom the latest release - Create folder:
.obsidian/plugins/draft42/in your vault - Copy the downloaded files into that folder
- Reload Obsidian and enable the plugin in Settings → Community plugins
- Go to draft42.io and create an account
- Get an API token at draft42.io/manage/account/security/tokens
- In Obsidian, go to Settings → Draft42
- Enter your API token
- Select your site and configure the vault path where your site content will live
All commands are available via the command palette (Ctrl/Cmd + P). Feel free to bind any command to a hotkey in Settings → Hotkeys.
| Command | Description |
|---|---|
Draft42: Preview and publish |
Opens your post in the browser to preview how it will look on your site. You can preview as many times as you want while working — publish only when ready. |
These commands create local notes in designated folders for organization. They don't sync to the server — use "Preview and publish" when you're ready to publish.
| Command | Description |
|---|---|
Draft42: Create new blog post idea |
Create a note in your Ideas folder |
Draft42: Create new blog post draft |
Create a note in your Drafts folder |
| Command | Description |
|---|---|
Draft42: Insert image |
Insert an image into the note |
Draft42: Insert gallery |
Insert a gallery of images into the note |
Draft42: Set cover image |
Choose a cover image for the post |
Draft42: Normalize images |
Collect all images used in a post into an ./images folder next to the post and rename them with unique hashes |
| Command | Description |
|---|---|
Draft42: Normalize frontmatter |
Ensure base frontmatter fields (status, description, posted on, etc.) and reorder them consistently |
When the "Manage file trees" automation is enabled, the plugin automatically organizes your posts based on their status frontmatter field:
Site/
└── Blog/
├── Ideas/
│ └── My Post Idea/
├── Drafts/
│ └── Work in Progress/
├── Published/
│ └── 2024-01-15 - My Published Post/
└── Archive/
└── 2023-06-01 - Old Post/
- Ideas → early stage notes
- Drafts → posts you're actively working on
- Published → posts live on your site
- Archive → posts removed from public view
Blog in the example above is the module name — it must match the module name configured in your Draft42 site settings.
When you change a post's status in the frontmatter, the plugin automatically moves it to the corresponding folder. Any post with a posted on date gets a date prefix (e.g., 2024-01-15 - Post Title).
Each post lives in its own self-contained folder — the markdown file and all its assets are kept together:
My Post/
├── My Post.md
└── images/
├── cover-hero.a1b2c3d4.jpg
├── cover-hero.a1b2c3d4.jpg.d42.json
├── post-diagram.e5f6g7h8.png
└── post-diagram.e5f6g7h8.png.d42.json
- Images are stored in an
images/subfolder next to the post - Filenames are prefixed with
cover-(cover images) orpost-(inline images) - A unique hash is appended to prevent naming conflicts
- Each image has a
.d42.jsonmetadata file that stores upload info
To keep assets organized, always use the dedicated commands (Insert image, Insert gallery, Set cover image) to add images to your posts.
The .d42.json metadata files are hidden by default in Obsidian. You'll only see them if you enable Settings → Files and links → Detect all file extensions. These files are managed by the plugin — do not edit them manually.
When you rename or delete an image, the plugin automatically manages its metadata file as well.
Block IDs enable deep linking to specific parts of your posts — paragraphs, headings, list items, code blocks, etc. When enabled, the plugin automatically adds Obsidian's standard block references (^blockid) to your content during preview/publish:
This is a paragraph. ^a1b2c3
- List item one ^d4e5f6
- List item two ^g7h8i9Why block IDs matter:
- Deep linking for readers: Your blog readers can link directly to specific paragraphs from your website
- [coming soon] Change tracking: Block IDs enable diffing between versions, so you can show what changed and publicly link to updates
Due to Obsidian API limitations, block IDs are visible in the editor. You can adjust their opacity (Settings → Draft42 → Block IDs → Opacity) to make them less distracting while writing.
- Authentication: API token for connecting to Draft42
- Sites: Map Draft42 sites to vault folders
- Automations: Toggle automatic file tree management (see above)
- Block IDs: Enable/disable block ID generation and adjust editor opacity (see above)
- Debugging: Extensive logging and internal metadata visibility
- [coming soon] Documentation
- Discord
- GitHub Issues
- support@draft42.io
See CONTRIBUTING.md for development setup and guidelines.