-
Notifications
You must be signed in to change notification settings - Fork 88
Desktop App
The desktop app wraps Markdown Viewer in Neutralinojs for users who want a lightweight local Markdown editor and viewer window. It uses the same editor, preview, renderer, sharing, and export code as the web app, with native file dialogs and local desktop storage.
- Runs in a Neutralinojs desktop window.
- Uses native open/save dialogs for Markdown and HTML.
- Can read a Markdown file path passed as a launch argument.
- Asks for confirmation before closing.
- Mirrors selected localStorage values into Neutralino storage for restart persistence.
- Uses a restricted native API allowlist.
- Prepared builds load renderer libraries from local
/libs/...files instead of CDNs. - The default configuration does not expose
os.execCommand; Markdown preview cannot execute local shell commands through the standard desktop build.
Network features remain network features: GitHub import, stored Share Snapshot, Live Share, remote diagram rendering, external images, and external links can still contact remote services.
desktop-app/
neutralino.config.json
package.json
setup-binaries.js
prepare.js
resources/
index.html
styles.css
js/
main.js
script.js
preview-worker.js
neutralino.js
libs/
assets/
prepare.js recreates the resource files from the root web app. Do not hand-edit generated resource copies unless you plan to rerun preparation.
cd desktop-app
npm install
npm run setup
npm run devnpm run setup downloads Neutralino binaries and runs prepare.js. Development runs the Neutralino app through npx -y @neutralinojs/neu@11.7.0 run.
npm run buildThe current package script runs Neutralino release build with --clean and removes dist/markdown-viewer-release.zip if it exists. Generated files appear under desktop-app/dist/.
Important neutralino.config.json values:
| Setting | Current Value |
|---|---|
| Application id | com.markdownviewer.desktop |
| Document root | /resources/ |
| Default mode | window |
| Window size | 1280 x 720 |
| Minimum size | 400 x 200 |
| Native API | Enabled |
| Token security | One-time |
| Logging | Disabled |
Allowed native APIs:
app.exitos.showOpenDialogos.showSaveDialogos.showMessageBoxos.openos.setTrayfilesystem.readFilefilesystem.writeFilestorage.setDatastorage.getData
os.execCommand is intentionally absent from the default allowlist. A custom build that adds local command execution must treat document content as untrusted and use an explicit opt-in with fixed, narrowly scoped commands.
Browser/chrome modes block filesystem and OS APIs more tightly.
prepare.js:
- Copies the root app into
desktop-app/resources. - Copies assets.
- Moves runtime scripts to the desktop resource structure.
- Rewrites library URLs for Neutralino.
- Downloads required external libraries to
resources/libs. - Verifies SHA-384 integrity when SRI hashes are available.
- Bundles Bootstrap icon fonts.
- Strips web-only SEO/canonical/hreflang/schema metadata from the desktop HTML.
This is why the prepared desktop app can load core bundled renderer libraries without CDNs after setup.
Windows may show SmartScreen warnings because binaries are unsigned.
Linux:
chmod +x markdown-viewer-linux_x64
./markdown-viewer-linux_x64macOS:
xattr -d com.apple.quarantine markdown-viewer-mac_universal
chmod +x markdown-viewer-mac_universal
./markdown-viewer-mac_universal- Normal documents and settings are local to the machine.
- Native file access happens through explicit open/save actions or launch arguments.
- The app does not include analytics or telemetry.
- Sharing/import/remote-rendering features use the same network behavior as the web app.
Wiki Home · Open Markdown Viewer · Repository · Releases · Report an Issue
Markdown Viewer documentation · Apache-2.0 License · Maintained by ThisIs-Developer
Get Started
Deploy & Configure
Project
Open Markdown Viewer
Markdown Viewer Repository
Releases
Report an Issue