From f4eab22af439f92ea7edc88dc3896f8817dab268 Mon Sep 17 00:00:00 2001 From: Baivab Sarkar Date: Sun, 5 Jul 2026 19:01:29 +0530 Subject: [PATCH] docs(wiki): update documentation and SEO wording --- README.md | 152 +++++---- desktop-app/README.md | 200 ++++++------ desktop-app/package.json | 2 +- index.html | 50 +-- locales/README_ja.md | 6 +- locales/README_ko.md | 6 +- locales/README_zh.md | 6 +- manifest.json | 2 +- script.js | 2 +- wiki/Configuration.md | 339 +++++++++---------- wiki/Contributing.md | 280 ++++++---------- wiki/Desktop-App.md | 215 +++++------- wiki/Development-Journey.md | 172 +++++----- wiki/Docker-Deployment.md | 202 ++++-------- wiki/FAQ.md | 177 ++++++---- wiki/Features.md | 596 ++++++++++++++++++++++++---------- wiki/Home.md | 112 +++---- wiki/Installation.md | 257 ++++++--------- wiki/Live-Share-Cloudflare.md | 123 +++++-- wiki/Localization.md | 141 ++++---- wiki/Markdown-Reference.md | 495 ++++++++++++++++------------ wiki/Usage-Guide.md | 269 +++++++-------- 22 files changed, 2003 insertions(+), 1801 deletions(-) diff --git a/README.md b/README.md index e3465a8d..106dc53a 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@

Markdown Viewer

- **A Markdown Editor That Lives in Your Browser, Desktop, and a Single URL.** + **A Premium Browser-Based Markdown Editor, Viewer, and Reader.** - *Fast GitHub-style Markdown editing with live preview, diagrams, LaTeX, syntax highlighting, PDF export, and multi-tab support across web, desktop, and Docker.* + *Open, read, edit, and preview `.md` files with split-screen live preview, sync scrolling, GitHub-Flavored Markdown, diagrams, LaTeX, syntax highlighting, PDF/HTML/PNG export, and multi-tab support across web, desktop, and Docker.* [![License](https://img.shields.io/github/license/ThisIs-Developer/Markdown-Viewer?style=flat-square&color=2ea043)](https://github.com/ThisIs-Developer/Markdown-Viewer/blob/main/LICENSE) [![Latest Release](https://img.shields.io/github/v/release/ThisIs-Developer/Markdown-Viewer?style=flat-square&color=3178C6)](https://github.com/ThisIs-Developer/Markdown-Viewer/releases) @@ -43,6 +43,7 @@
- [About the Project](#about-the-project) + - [Current Behavior and Privacy](#current-behavior-and-privacy) - [Key Features](#key-features) - [System Architecture](#system-architecture) - [High-Level Architecture Diagram](#high-level-architecture-diagram) @@ -63,19 +64,29 @@ ## About the Project -**Markdown Viewer** is an advanced, fully client-side editing suite and previewer optimized for a professional documentation workflow. Running completely inside the browser, it renders GitHub-Flavored Markdown (GFM), math formulas, and architectural diagrams in real time. +**Markdown Viewer** is a premium browser-based Markdown editor, viewer, reader, and previewer optimized for professional documentation workflows. It opens local `.md` and `.markdown` files, lets you write in plain Markdown, and renders GitHub-Flavored Markdown (GFM), math formulas, diagrams, code blocks, tables, and other rich Markdown content in a split-screen live preview with sync scrolling. -Designed with privacy and performance at its core, the application performs all parsing in a background worker thread, employs incremental DOM patching to minimize browser repaints, and supports native offline capabilities via a Service Worker proxy. It is also packaged as a lightweight native desktop shell using the Neutralinojs framework. +Designed with privacy and performance at its core, the application keeps ordinary editing, previewing, autosave, and most exports on your device, performs heavy parsing in a background worker thread, uses incremental DOM patching to minimize browser repaints, and supports offline-capable PWA behavior after the web build has cached its assets. It is also packaged as a lightweight native desktop shell using the Neutralinojs framework. --- -## Key Features +## Current Behavior and Privacy -### 📐 LaTeX Math Notation -Render inline and display mathematical formulas natively using the MathJax typesetting engine. -

- LaTeX Math Notation -

+Markdown Viewer is not a cloud workspace. Normal typing, preview rendering, local file import, tab autosave, theme settings, and most exports happen on your device. No account is required. The app does not implement analytics, telemetry, ads, or tracking cookies. + +Some user-triggered features do use the network: + +- **GitHub import** fetches public Markdown files from GitHub. +- **Remote diagram renderers** can receive diagram source for PlantUML, D2, Graphviz, Vega-Lite, WaveDrom, and some diagram previews. +- **Share Snapshot** creates point-in-time links. Small documents stay compressed in the URL hash. Larger documents are stored in Cloudflare KV for 90 days through `/api/share`. +- **Live Share** creates temporary real-time rooms through a Cloudflare Durable Object. It relays Yjs updates, display names, presence, and cursors while the room is active; it is not permanent document storage. +- **CDN libraries and external document assets** can be requested by the browser unless you use the prepared desktop bundle or self-host the needed assets. + +For the full feature, limitation, and data-handling reference, read the [wiki feature guide](wiki/Features.md). + +--- + +## Key Features ### 📊 Interactive Mermaid Diagrams Generate flowcharts, Gantt charts, and sequence diagrams with zoom, pan, and SVG export controls. @@ -90,20 +101,44 @@ Render complex architectural diagrams and visualizations instantly with a clean, - **D2**: Script clean, modern diagrams-as-code layout structures. - **Graphviz**: Visualize network topologies, trees, and directed graphs via DOT script notation. - **Vega-Lite**: Describe declarative charts, data plots, and statistical visualizations. -- **Wavedrom**: Draw digital timing diagrams and waveform representations. - **Markmap**: Generate interactive mindmaps from nested markdown lists.

Client-Side PlantUML Diagrams

+### 🌊 WaveDrom Timing Diagrams +Draw digital timing diagrams and waveform representations for hardware notes, protocol docs, and signal-heavy technical writing. + +### 🎼 ABC Music Player & Sheet Music Viewer +Render ABC notation into sheet music with synchronized audio playback, note highlighting, and PNG/SVG export options. +

+ + ABC Music Notation & Audio Synthesis +

+ +### 🤝 Live Share Temporary Rooms +Start a temporary real-time room for collaborative editing or view-only review. Live Share relays updates through Cloudflare Durable Objects and does not create permanent document storage. + +### 🔗 Share Snapshot Links +Create point-in-time links in view-only or editable mode. Small snapshots stay in the URL hash; larger snapshots use Cloudflare KV for 90 days. +

+ Share Snapshot modal +

+ +### 📐 LaTeX Math Notation +Render inline and display mathematical formulas natively using the MathJax typesetting engine. +

+ LaTeX Math Notation +

+ ### 🗺️ Interactive Map Renderers Parse and visualize GeoJSON and TopoJSON map files directly inside your preview area.

Interactive Map Renderers

-### 📦 STL 3D Model Renderer ([View Release Demo v3.9.0](https://github.com/ThisIs-Developer/Markdown-Viewer/releases/tag/v3.9.0)) +### 📦 STL 3D Model Renderer Render and interact with STL (ASCII/Binary) files featuring perspective controls, flat shading, and reset controls.

STL 3D Model Renderer @@ -111,17 +146,10 @@ Render and interact with STL (ASCII/Binary) files featuring perspective controls STL 3D Model Renderer

-### 🎼 ABC Music Player & Sheet Music Viewer ([Listen Now!](https://markdownviewer.pages.dev/#share=eJyFUlFv0zAQfs-v-LSXgRTapRvaFImHdIhN21oNVgFCQurFviQG164uDlWl_HicdJuAPfBytu-77_N3Z6_XaypV8jXPzpJVvmBtjWvxiRS3E9xc02TMzy051cSgD1BKP-kPeGU2vhOEhrEiCST_4PccWPAQhDn8BS3zoxfcI-yoBaGW4TrxG3LBKGzYei20IRiHsPMgFdooUO5H7la8NVWsW1CI5x2uhGsve9zxzrR4lZ2fv32TXWQXr1PsTGiw6dpYHdlPhIPJW-PqSZT9YKQNiNZcYA0KuPS_2AVckWh2g4colqUw4dGuIjGKQicMX2FJW2_ZuzxKHTpMh7T1O3gxtXEpuraTbTuaD414xxj7JdNyi26LJtp2zHoPYUvB-PguwcdGjVNs99CmdibsB7OrYQCW9qh4dKDReBlkSvFd3QR4F5ltoJonySK_7JOPeTY9e5fNTpK7uLtI5vmNbxyuyVosHtLY3OlpiqWX0HSbkmV4-uRb_tlYG0WwGId3L_4Hq4DZSXaOwsUOvojRnNzm7xM9QzXlaRydrjT6uOhjDXWsy8OpGpDHkh6q4AL1EPr_MUuqYuo4xh6suYI-Q98nagY1nU8LcKGKASrqAtWoiOqFYvm0T55N6GdrLxJl_IwVjz51XFQxV-i_J-v1-jdZqQvS&edit=1)) -Render ABC notation into beautiful sheet music with synchronized audio playback, note highlighting, and PNG/SVG export options—perfect for listening to music while writing. +### 🖊️ Split-Screen Markdown Editor and Live Preview +Type, paste, or open Markdown in the plain-text editor and watch it render in real time in the live preview pane.

- - ABC Music Notation & Audio Synthesis -

- -### 🖊️ Decoupled Split-Screen Editing -Type Markdown in the custom editor and watch it render in real-time in the live preview pane. -

- Decoupled Split-Screen Editing + Split-screen Markdown editor with live preview

### 📑 Multi-Document Tab Workspace @@ -137,10 +165,10 @@ Perform scoped searches using regular expressions, syntax scopes, and side-by-si Find & Replace with Diff Preview

-### 🛠️ Formatting Toolbar & Quick Modals -Quickly insert markdown elements, tables, emojis, and symbols using dedicated formatting toolbar modals. +### 🛠️ Markdown Formatting Toolbar & Quick Modals +Quickly insert Markdown elements, tables, emojis, and symbols using dedicated toolbar modals while the document remains editable plain text. This is not a true in-place WYSIWYG editor; it is plain Markdown editing with live preview.

- Formatting Toolbar & Quick Modals + Markdown formatting toolbar and quick modals

### 🌐 Multi-Language Translation (i18n) @@ -149,20 +177,14 @@ Access a fully localized user interface with support for English, Simplified Chi Multi-Language Translation (i18n)

-### 📤 Layout-Aware PDF, HTML & PNG Export +### 📤 Markdown to PDF, HTML & PNG Export Export your documents to raw Markdown, centered inline HTML, high-quality PNG images, or paginated PDF with re-engineered page breaks.

Layout-Aware PDF, HTML & PNG Export

-### 🔗 Serverless Compressed URL Sharing ([Click to Try](https://markdownviewer.pages.dev/#share=eJx1kbtOIzEUhnue4pSm4CFISDbco2EiagOGmJhxZGcaqkx2V1DQ5QICxEUIIXEHgRQQqQZ6zysw2bCw4R32hCFQICpb9neO_8-nDzITkHDmBNdZeCxWIMWEkD19EB-Dp9Nis1Fu1k9atSUgE3whL_gsZzMQz3KHadb7VtBs7PzZb2DFUBpaq_utzeO_h1tAhmiefkKhVw5L5dA7Cr3d0DtDetiC1-rmy_VJu3YFZFgqRp2IbVeX__2uvlbX2r_q7fUKsjEL0lIV3DnXP9RAYopqLiJ4XPi7SCRQQuepfyEFJsWXUScCUlJQBJIWJBV1_APKsUNSMWf6HYhJZ166CpmBBAwwt6Cns0B-MLXQDZSi0ZdYGTA7wc_ACzxza-rmBojlas27nNkOinh8aa6DEuKDNgwWqMBrCeR9F4FxTjv9bAts_07l_AMGxHZV7iP0KFNZOtXJnR5BdaFzHAiuH0B8kT1s3C91mkzC0433fFTpzslWdIYXuHSo-GZQmX4we-YWw54Hq6aBPivocw4kk1OUO198glpQ-g8VBvRv&edit=1)) -Share view or edit mode documents database-free via zlib DEFLATE compressed URL hashes. -

- Serverless Compressed URL Sharing -

- -### 📥 Multi-Source File Import -Drag and drop local files, or import directories recursively directly from public GitHub repositories. +### 📥 Open Local .md Files and Import from GitHub +Drag and drop local `.md` or `.markdown` files, use the file picker, or import Markdown files from public GitHub repositories.

Multi-Source File Import File Import selection @@ -313,11 +335,12 @@ graph TD ## Getting Started & Installation -### 💻 Option 1: Quick Local Run (No Installation/No Server) -Because Markdown Viewer runs completely client-side utilizing standard HTML, CSS, and JavaScript, you can run it instantly directly from your filesystem: +### 💻 Option 1: Quick Local Run (No Installation) +Because Markdown Viewer uses Web Workers, Service Workers, and browser storage APIs, run it through a local HTTP server instead of opening `index.html` with `file://`: 1. Clone or download the repository to your local machine. -2. Open the repository folder in your system **File Manager**. -3. Simply double-click **`index.html`** to open the editor directly in your default web browser. +2. Open a terminal in the repository folder. +3. Run `python -m http.server 8080` or `npx serve . -p 8080`. +4. Open **[http://localhost:8080](http://localhost:8080)** in your browser. --- @@ -360,10 +383,8 @@ You can compile and run a native standalone desktop app (Windows, macOS, or Linu # Synchronize resources with the main web app node prepare.js - # Build/compile the application for Windows and other systems + # Build/compile the release application npm run build - # Or build a standalone portable executable - npm run build:portable ``` *Note: You can also download prebuilt standalone binaries directly from the [Releases](https://github.com/ThisIs-Developer/Markdown-Viewer/releases) page without compiling it yourself.* @@ -430,26 +451,31 @@ Markdown-Viewer/ | Library Name | Version | Role in App | Loading Method | | :--- | :--- | :--- | :--- | -| **[Marked.js](https://marked.js.org/)** | 9.1.6 | Parses markdown content to HTML elements. | Defer (Upfront) | -| **[Highlight.js](https://highlightjs.org/)** | 11.9.0 | Adds syntax highlighting to code sections. | Defer (Upfront) | -| **[DOMPurify](https://github.com/cure53/DOMPurify)** | 3.0.9 | Sanitizes HTML outputs against XSS. | Defer (Upfront) | -| **[FileSaver.js](https://github.com/eligrey/FileSaver.js/)** | 2.0.5 | Manages file saving on the client side. | Defer (Upfront) | -| **[js-yaml](https://github.com/nodeca/js-yaml)** | 4.1.0 | Parses YAML frontmatter headers. | Defer (Upfront) | -| **[Bootstrap](https://getbootstrap.com)** | 5.3.2 | Provides component structures and modal panels. | Upfront Script | -| **[Bootstrap Icons](https://icons.getbootstrap.com/)** | 1.11.3 | Provides responsive vector symbols across formatting tools and headers. | Preloaded (Upfront) | -| **[GitHub Markdown CSS](https://github.com/sindresorhus/github-markdown-css)** | 5.3.0 | Matches GitHub's exact light and dark typography rendering styles. | Upfront / Exports | -| **[Mermaid.js](https://mermaid.js.org/)** | 11.15.0 | Renders interactive flowcharts and diagrams. | Lazy-loaded on diagram find | -| **[MathJax](https://www.mathjax.org/)** | 3.2.2 | Renders mathematical LaTeX expressions. | Lazy-loaded on math find | -| **[jsPDF](https://github.com/parallax/jsPDF)** | 2.5.1 | Generates paginated PDF documents client-side. | Lazy-loaded on PDF request | -| **[html2canvas](https://html2canvas.hertzen.com/)** | 1.4.1 | Captures HTML layouts as canvas objects. | Lazy-loaded on PDF request | -| **[pako.js](https://github.com/nodeca/pako)** | 2.1.0 | Handles DEFLATE compression for share links, PlantUML, and D2 diagrams. | Lazy-loaded on share, PlantUML, or D2 request | -| **[JoyPixels](https://www.joypixels.com/)** | 9.0.1 | Renders standard emoji sets. | Lazy-loaded on emoji select | -| **[Leaflet](https://leafletjs.com/)** | 1.9.4 | Powers interactive GeoJSON and TopoJSON map overlays. | Lazy-loaded on map detection | -| **[TopoJSON](https://github.com/topojson/topojson)** | 3.0.2 | Parses TopoJSON structures into standard GeoJSON coordinates. | Lazy-loaded on topojson detection | -| **[Three.js](https://threejs.org/)** | r128 | Renders STL 3D models with canvas viewports. | Lazy-loaded on STL file detection | -| **[ABC Music Notation (abcjs)](https://www.abcjs.net/)** | 6.5.2 | Renders sheet music notation from raw text definitions. | Lazy-loaded on abc music detection | -| **[PlantUML](https://plantuml.com/)** | - | External server rendering SVG diagrams from compressed markup. | Lazy-loaded on PlantUML detection | -| **[Kroki / D2](https://kroki.io/)** | - | External server rendering D2 diagrams into theme-matched SVG. | Lazy-loaded on D2 detection | +| **[Bootstrap](https://getbootstrap.com)** | 5.3.2 | Provides responsive layout, dropdowns, modals, and UI components. | Initial page load | +| **[Bootstrap Icons](https://icons.getbootstrap.com/)** | 1.11.3 | Provides toolbar, header, modal, and action icons. | Initial page load | +| **[GitHub Markdown CSS](https://github.com/sindresorhus/github-markdown-css)** | 5.3.0 | Provides GitHub-style preview typography for the rendered document. | Initial page load / exports | +| **[Marked.js](https://marked.js.org/)** | 9.1.6 | Parses Markdown into HTML in the main thread and preview worker. | Initial page load / worker | +| **[Highlight.js](https://highlightjs.org/)** | 11.9.0 | Adds syntax highlighting to fenced code blocks. | Initial page load / worker | +| **[DOMPurify](https://github.com/cure53/DOMPurify)** | 3.0.9 | Sanitizes rendered HTML before it enters the preview. | Initial page load | +| **[FileSaver.js](https://github.com/eligrey/FileSaver.js/)** | 2.0.5 | Handles browser downloads for exported files. | Initial page load | +| **[js-yaml](https://github.com/nodeca/js-yaml)** | 4.1.0 | Parses YAML frontmatter for display and export handling. | Initial page load | +| **[MathJax](https://www.mathjax.org/)** | 3.2.2 | Renders inline and display LaTeX math. | Lazy-loaded on math detection | +| **[Mermaid.js](https://mermaid.js.org/)** | 11.15.0 | Renders Mermaid diagrams with zoom, copy, PNG, and SVG actions. | Lazy-loaded on Mermaid detection | +| **[jsPDF](https://github.com/parallax/jsPDF)** | 2.5.1 | Builds the legacy raster PDF export. | Lazy-loaded on legacy PDF request | +| **[html2canvas](https://html2canvas.hertzen.com/)** | 1.4.1 | Captures rendered HTML for legacy PDF and PNG export. | Lazy-loaded on PDF/PNG request | +| **[pako.js](https://github.com/nodeca/pako)** | 2.1.0 | Handles DEFLATE compression for share links and diagram encoding. | Lazy-loaded on share or diagram request | +| **[JoyPixels / emoji-toolkit](https://www.joypixels.com/)** | 9.0.1 | Converts emoji shortcodes and powers emoji UI rendering. | Lazy-loaded on emoji use | +| **[ABCJS](https://www.abcjs.net/)** | 6.5.2 | Renders ABC music notation and playback. | Lazy-loaded on ABC notation detection | +| **[Leaflet](https://leafletjs.com/)** | 1.9.4 | Renders interactive GeoJSON and TopoJSON maps. | Lazy-loaded on map detection | +| **[TopoJSON](https://github.com/topojson/topojson)** | 3.0.2 | Converts TopoJSON data for map rendering. | Lazy-loaded on TopoJSON detection | +| **[Three.js](https://threejs.org/)** | r128 | Renders STL 3D models. | Lazy-loaded on STL detection | +| **STLLoader / OrbitControls** | Three r128 examples | Loads STL files and provides model orbit controls. | Lazy-loaded on STL detection | +| **[D3](https://d3js.org/)** | 7 | Supports Markmap rendering. | Lazy-loaded on Markmap detection | +| **[Markmap](https://markmap.js.org/)** | 0.18.12 | Renders Markmap mind maps from Markdown lists. | Lazy-loaded on Markmap detection | +| **[Yjs](https://docs.yjs.dev/)** | 13.6.10 via esm.sh | Powers Live Share document synchronization. | Lazy-loaded on Live Share | +| **[PlantUML](https://plantuml.com/)** | Remote service | Renders PlantUML diagrams when local desktop commands are unavailable. | Network request on PlantUML render | +| **[Kroki](https://kroki.io/)** | Remote service | Renders D2, Graphviz, Vega-Lite, WaveDrom, and fallback diagram SVGs. | Network request on supported diagram render | +| **[mermaid.ink](https://mermaid.ink/)** | Remote service | Provides preview/fallback Mermaid image rendering in selected flows. | Network request on selected diagram previews | --- @@ -483,7 +509,9 @@ Thanks to everyone who has contributed to Markdown Viewer. ## 📈 Development Journey -Markdown Viewer has grown from a lightweight Markdown parser into a full-featured, professional application with advanced rendering, workflow, and export capabilities. Compare the current version with the original version to see the progress in UI design, performance optimization, and feature depth. +Markdown Viewer started as a small personal project on a PC: a simple Markdown viewer built with curiosity, mistakes, fixes, and a lot of care. The original version is still online, and it remains the heart of the project. + +The current Markdown Viewer grew through community feedback, issues, PRs, screenshots, GIFs, suggestions, and real documentation workflows. The technical progress matters, but the journey is also emotional: people helped shape the app into what it is today. --- diff --git a/desktop-app/README.md b/desktop-app/README.md index e1c1b77d..ee0dd1f0 100644 --- a/desktop-app/README.md +++ b/desktop-app/README.md @@ -1,97 +1,103 @@ -# Markdown Viewer Desktop App Port - -This is a desktop app port of [Markdown Viewer](https://github.com/ThisIs-Developer/Markdown-Viewer), see [README](../README.md). It is built using [Neutralinojs](https://github.com/neutralinojs/neutralinojs). - -## Architecture - -The desktop app **shares** its core files (`script.js`, `styles.css`, `assets/`) with the browser version in the repo root. A build script (`prepare.js`) copies these files into `resources/` and injects Neutralinojs-specific additions into `index.html` at build time. - -Neutralinojs platform binaries are managed by `setup-binaries.js`, which downloads them on first use and caches them in `bin/` (gitignored). The download is version-locked to `cli.binaryVersion` in `neutralino.config.json` and only re-triggered when that version changes. - -Desktop-only files (not generated): - -- `resources/js/main.js` — Neutralinojs lifecycle, tray menu, window events -- `resources/js/neutralino.js` — Neutralinojs client library -- `neutralino.config.json` — App configuration -- `setup-binaries.js` — Idempotent binary setup (downloads on first use) - -## Development - -### Requirements - -- [Node.js](https://nodejs.org/) - -### Setup - -No installation is required. The app is built and run using `npx` (via npm scripts). - -Neutralinojs platform binaries are downloaded automatically on first build or dev run. To manually trigger the download: - -```bash -npm run setup -``` - -Binaries are cached in `bin/` (gitignored) and only re-downloaded when `cli.binaryVersion` in `neutralino.config.json` changes. - -### Running the app - -```bash -npm run dev -``` - -This automatically runs `setup` (downloads binaries if needed and prepares resources) before starting the app. Hot-reload is enabled by default. Enable the browser inspector by setting `"enableInspector": true` in `neutralino.config.json`. - -For more information, see the [Neutralinojs documentation](https://neutralino.js.org/docs/cli/neu-cli#installation). - -### Building the app - -**Default** - Build the portable Neutralino bundle: - -```bash -npm run build -``` - -Build output is placed in `dist/`. - -Note: `npm run build` writes the portable app directory to -`dist/markdown-viewer/`, including platform binaries and `resources.neu`. The -GitHub release workflow archives that directory as a ZIP and also uploads the -Windows x64 executable as a standalone asset. - -For more information, see the [Neutralinojs documentation](https://neutralino.js.org/docs/cli/neu-cli#neu-build). - -### Building with Docker - -Build binaries without installing Node.js locally: - -```bash -docker compose up --build -``` - -Build artifacts will be output to `desktop-app/output/`. - -## Releases - -Prebuilt binaries are automatically built and published as GitHub Releases when a tag matching `desktop-v*` is pushed (e.g., `desktop-v1.0.0`). See [`.github/workflows/desktop-build.yml`](../.github/workflows/desktop-build.yml). - -Each release includes: - -| Asset | Description | -| ----- | ----------- | -| `markdown-viewer-win_x64.exe` | Windows x64 executable | -| `markdown-viewer-vX.Y.Z-portable.zip` | Portable bundle with `resources.neu` (all platforms) | -| `source.tar.gz` | Desktop app source archive | -| `SHA256SUMS.txt` | Checksums for all release assets | - -## License - -**MIT**. - -The desktop version uses [Neutralinojs](https://github.com/neutralinojs/neutralinojs), which is also licensed under the MIT License. - -- [Neutralinojs](https://github.com/neutralinojs/neutralinojs): [LICENSE (MIT)](LICENSE) -- [Markdown Viewer & Desktop Port](https://github.com/ThisIs-Developer/Markdown-Viewer): [LICENSE (MIT)](../LICENSE) - -## Contributors - -[![Contributors](https://contrib.rocks/image?repo=ThisIs-Developer/Markdown-Viewer)](https://github.com/ThisIs-Developer/Markdown-Viewer/graphs/contributors) +# Markdown Viewer Desktop App + +This folder contains the Neutralino desktop wrapper for Markdown Viewer v3.9.0. It turns the browser-based Markdown editor, viewer, and reader into a desktop app for opening local `.md` files, using split live preview, exporting documents, and working with native file dialogs. It reuses the root web app and adds native window lifecycle handling, desktop storage mirroring, and an offline-prepared resource bundle. + +For the complete product behavior and privacy reference, see [../wiki/Features.md](../wiki/Features.md). + +## Architecture + +The desktop app shares the same core product code as the browser version: + +- `../index.html` +- `../script.js` +- `../styles.css` +- `../preview-worker.js` +- `../assets/` + +`prepare.js` copies those files into `desktop-app/resources`, rewrites paths for Neutralino, downloads external libraries into `resources/libs`, verifies SHA-384 integrity where available, and strips web-only SEO metadata from the desktop HTML. + +Desktop-only files: + +- `neutralino.config.json`: Neutralino runtime configuration and native API allowlist. +- `setup-binaries.js`: Idempotent Neutralino binary setup. +- `resources/js/main.js`: window close confirmation, tray setup, launch-file import, and external-open handling. +- `resources/js/neutralino.js`: Neutralino client library. + +## Desktop Behavior + +- Local editing, preview, document tabs, exports, and settings stay on the local machine. +- Normal app state is stored in localStorage and mirrored to Neutralino storage. +- Native Markdown/HTML save and Markdown open flows use Neutralino dialogs and filesystem APIs. +- A Markdown file passed as a launch argument is loaded into the editor. +- The app asks before closing the window. +- Prepared desktop resources load dynamic libraries from local `/libs/...` paths. + +Network features still use the network when invoked: GitHub import, stored Share Snapshot, Live Share, remote diagram rendering, external images, and external links. + +## Development + +Requirements: + +- Node.js and npm. +- Internet access for first setup and dependency preparation. + +Run: + +```bash +cd desktop-app +npm install +npm run setup +npm run dev +``` + +`npm run setup` downloads Neutralino binaries and runs `prepare.js`. Binaries are cached in `bin/` and refreshed when the configured Neutralino version changes. + +## Build + +```bash +npm run build +``` + +The current build script runs: + +```bash +npx -y @neutralinojs/neu@11.7.0 build --release --clean +``` + +Build output is written under `desktop-app/dist/`. + +## Configuration Highlights + +| Setting | Value | +| :--- | :--- | +| Application id | `com.markdownviewer.desktop` | +| Version | `3.9.0` | +| Document root | `/resources/` | +| Default window | 1280 x 720 | +| Minimum window | 400 x 200 | +| Native API | Enabled | +| Token security | One-time | +| Logging | Disabled | +| Neutralino binary/client version | 6.5.0 | + +Native APIs are intentionally allowlisted: app exit, open/save dialogs, message boxes, external URL open, tray setup, command execution, file read/write, and storage get/set. + +## Docker Build + +The desktop folder includes Docker files for building desktop artifacts in a container: + +```bash +docker compose up --build +``` + +Check the compose file for the mounted output path used by the current build. + +## Releases + +Prebuilt desktop assets are published through GitHub Releases. Release workflows run setup, preparation, build, and checksum generation. + +Unsigned desktop binaries may trigger Windows SmartScreen or macOS quarantine prompts. See [../wiki/Desktop-App.md](../wiki/Desktop-App.md) for platform launch notes. + +## License + +Markdown Viewer is licensed under the Apache License 2.0. Neutralinojs is licensed under MIT; see the bundled Neutralino license file in this folder. diff --git a/desktop-app/package.json b/desktop-app/package.json index dc236e18..4897c570 100644 --- a/desktop-app/package.json +++ b/desktop-app/package.json @@ -2,7 +2,7 @@ "name": "markdown-viewer-desktop", "version": "3.9.0", "private": true, - "description": "A premium client-side GitHub-style Markdown editor and live preview tool for desktop, featuring math rendering, diagrams, syntax highlighting, and PDF/HTML exports.", + "description": "A premium desktop Markdown editor, viewer, and reader for opening .md files with split live preview, math, diagrams, syntax highlighting, and PDF/HTML/PNG exports.", "scripts": { "setup": "node setup-binaries.js", "postsetup": "node prepare.js", diff --git a/index.html b/index.html index 0f23b98a..84ca63d4 100644 --- a/index.html +++ b/index.html @@ -38,8 +38,8 @@ - - + + @@ -52,7 +52,7 @@ - + @@ -60,7 +60,7 @@ - + @@ -71,17 +71,22 @@ "name": "Markdown Viewer", "url": "https://markdownviewer.pages.dev/", "image": "https://markdownviewer.pages.dev/assets/icon.jpg", - "description": "A powerful GitHub-style Markdown rendering tool with live preview, LaTeX, Mermaid, syntax highlighting, and PDF export.", + "description": "A browser-based Markdown editor, viewer, and reader for opening .md files, writing plain Markdown, and using split-screen live preview with GitHub-Flavored Markdown, sync scrolling, LaTeX math, Mermaid diagrams, syntax highlighting, and PDF, HTML, PNG, or Markdown export.", "applicationCategory": "DeveloperApplication", "operatingSystem": "All", "browserRequirements": "Requires HTML5 compatible browser", "softwareVersion": "3.9.0", "featureList": [ - "Client-side Markdown editing", - "GitHub-style live preview", + "Browser-based Markdown editor, viewer, and reader", + "Open local .md and .markdown files", + "Split-screen live Markdown preview", + "Sync scrolling between editor and preview", + "GitHub-Flavored Markdown support", + "Markdown formatting toolbar", "LaTeX math rendering", "Mermaid diagram rendering", - "PDF, HTML, PNG, and Markdown export" + "PDF, HTML, PNG, and Markdown export", + "Optional Share Snapshot and Live Share workflows" ], "author": { "@type": "Organization", @@ -139,13 +144,13 @@

Markdown Viewer

- - -
@@ -248,15 +253,15 @@

Menu

- - - @@ -360,7 +365,7 @@

Menu

-