MardoGuides

How to export a Markdown file as HTML in Mardo

Save the Markdown file, then choose File → Save/Publish HTML…. Pick the HTML destination, select a built-in or current editor theme, and save. Mardo writes one complete responsive HTML page that can be opened directly in a browser.

Export is part of Mardo Pro. If your trial has not started, Mardo asks before anything is written. Start Mardo Pro Trial begins day 1 and continues the export; Not Now and Get Mardo Pro… leave the trial and destination unchanged.

Export from the app

  1. Save the Markdown document with File → Save or Command-S.

  2. Choose File → Save/Publish HTML….

  3. Choose Current Editor or one of Mardo's built-in themes.

  4. Choose a destination ending in .html.

  5. Select Save.

Mardo exports the last explicitly saved Markdown bytes. If the document is untitled or has unsaved changes, save it before exporting. The HTML export contains semantic document structure, resolved theme styling, print rules, and the active editor zoom from 50% through 300%.

Run a command after export

The export panel can run one optional publish command after the HTML file is safely written.

  1. Enable the publish-command option in the export panel.

  2. Enter a single-line command containing @filename exactly once.

  3. Save the HTML file.

Mardo replaces @filename with the saved HTML path as one quoted shell argument, then runs the command with /bin/zsh -l -c in the HTML file's directory. The command has your shell authority. Document text cannot supply or extend it. If the command fails, the HTML remains saved and Mardo writes bounded diagnostics beside it when safe.

To make this the visible default for future app exports, save a valid command under Mardo → Settings… → Export, then enable Run after every HTML export by default. An AI connected through Mardo's local tools can perform the same narrow setup when you ask it to configure HTML publishing. Configuration never runs the command. A future export panel opens checked, and you can uncheck it for one save without changing the default.

Export from Terminal

After installing the optional mardo command, run:

mardo README.md --export-html public/readme.html

Choose a theme and zoom:

mardo README.md --export-html public/readme.html --theme FloofLogic --zoom 100

Run an authorized command after saving:

mardo README.md --export-html public/readme.html --run 'my-publisher @filename'

Built-in theme names are MardoDark, MardoLight, GitHubLight, GitHubDark, and FloofLogic. Terminal source and destination paths may be relative to the current directory. Terminal export routes through Mardo.app for Pro access. It never starts a trial on your behalf; when the trial is unstarted, open Mardo, choose Start Mardo Pro Trial on an Editing or Export action, then retry the command.

What HTML export does not do

Export does not modify the Markdown, copy linked assets, execute document HTML or JavaScript, or turn Mermaid source into active browser code. Relative links and image paths remain relative in the exported page.

Current as of September 10, 2026.