maalolan344 downloadsconverts markdown file to html files with builtin css for easy hosting
The plugin converts the note you have open into a themed HTML file. It is pure TypeScript, so there is no Python(older version was made with python but yk obsidian excpects eveything on js so ya ) or any other external tool to install.
node --version should work).The easiest way is to keep the plugin source directly inside your test vault:
<your vault>/.obsidian/plugins/mdtohtml/
The folder name must match the id in manifest.json (mdtohtml).
src/, manifest.json, package.json, tsconfig.json, your esbuild.config.mjs, etc.).npm install
npm run dev
Leave this running. It rebuilds main.js every time you save a source file.
For a one-off production build use npm run build instead (this also type-checks and shows any TypeScript errors).To pick up new code after a rebuild, reload Obsidian (Ctrl+R / Cmd+R) or toggle the plugin off and on.
Create a note called Test Note in the vault and paste this in. Put any picture in the vault first (for example drag a PNG into the note so Obsidian saves it) and use its real file name in the lines marked below.
---
title: frontmatter should NOT show up in the export
tags: [test]
---
# Test Note
Normal paragraph with **bold**, *italic*, ~~strike~~, ==highlight== and `inline code`.
A second line right below (should stay a line break).
![[YOUR-IMAGE.png]]
![[YOUR-IMAGE.png|200]]
![[does-not-exist.png]]

A [[Some Other Note|wikilink with alias]] and a [normal link](https://obsidian.md).
> A quote with **bold** text.
- [ ] open task
- [x] done task
- plain bullet
1. first
2. second
| Name | Value |
| ---- | ----- |
| A | 1 |
| B | 2 |
```js title
console.log("this fence line used to freeze the converter");
```
---
End.
Test Note (the command only appears while a Markdown note is the active file).Ctrl+P / Cmd+P and run Convert current Markdown to HTML.Exported: exports/Test-Note.html.The export folder is created in the vault root:
<your vault>/
└── exports/
├── Test-Note.html
└── assets/
└── your-image-1a2b3c.png
Obsidian's file explorer only lists notes and images, so open the .html from your system file manager (right-click the exports folder in Obsidian → "Show in system explorer") and double-click it to open in a browser.
Check:
![[...]], the |200 version is narrower, and the standard  one shows too.js title code block renders and the export finishes (no freeze).Settings → md2html:
| Setting | What to try |
|---|---|
| Export theme | Try several (Dark, Dracula, Sepia, Automatic...). Re-run the command and re-open the HTML. For Automatic, switch your OS between light and dark mode. |
| Export folder | Default is exports. Change it to e.g. site/out, re-run, and check the new folder (parent folders are created automatically). |
| Images | "Save as separate files" writes into the image folder. "Embed inside the HTML" puts images inside the HTML as base64 (no assets folder needed, the single file works anywhere). |
| Image folder name | Default is assets. Change it to e.g. media and re-run. |
Re-running the command overwrites the existing HTML. Unchanged images are not rewritten.
Ctrl+Shift+I / Cmd+Option+I) → Console while converting. A normal run prints no errors. Image problems are logged as md2html: could not export image "...".../outside. It should fall back to exports instead of writing outside the vault.Exported: <export folder>/<Note-Name>.html<export folder>/<image folder>/ (or embedded, depending on the Images setting).Open a Markdown file first.).Conversion failed. See console for details.Settings are stored in:
<vault>/.obsidian/plugins/mdtohtml/data.json
Example:
{
"exportTheme": "dark",
"exportPath": "exports",
"assetsFolder": "assets",
"imageMode": "files"
}
Deleting this file resets everything to the defaults.
.obsidian/plugins/mdtohtml/ and contains main.js and manifest.json. main.js only exists after npm run dev or npm run build has run.minAppVersion in manifest.json is not higher than your Obsidian version.npm run build shows TypeScript errorsCopy the full message. The build runs tsc first, so type errors stop it before bundling.
.md note.exports folder. If you move or email only the .html, the assets folder has to travel with it. Switch Images to "Embed inside the HTML" if you need one standalone file.exports folder is the deploy root (for example for Vercel), because pages link images with relative paths like assets/name.png.> [!note]), and syntax highlighting in code blocks.