One engine, and nothing leaves the Mac.
Galley's app, its Quick Look extension, its thumbnail extension, and its command line all call one Swift package. What that package refuses to do is as much a part of the design as what it does.

A Swift package of three static libraries
| GalleyCore | Detects the dialect and parses it: YAML front matter, CommonMark and GFM, and PubMark 0.1 Core with its directives, then resolves numbering, references, and diagnostics. Pure Swift, no web view. |
|---|---|
| GalleyRender | Turns a parsed document into HTML under an explicit policy, with the eight templates and their stylesheets, the sanitizer, the content security policy, the vendored assets, and the Core Graphics thumbnail renderer. |
| GalleyServices | The pieces that touch the machine: preferences, the custom template store, the file watcher, the Quick Look health probe, the Scriptorium client, the demo documents, and the document view model. |
The app and its two extensions are thin shells over these, and the galley command hands files to the app. The Xcode project is generated from a single XcodeGen file, and the package has its own tests.
What a document cannot do
- Every render gets a new 128-bit random nonce and a content security policy that allows scripts only with that nonce, and blocks network fetches by default (connect, frame, and object sources are none).
- Script tags, event-handler attributes, javascript: addresses, and scripts in SVG are stripped in every mode, with no setting to allow them.
- Raw HTML in a document is escaped by default. A setting in the app, never in Quick Look, allows sanitized raw HTML.
- Remote images are off by default, and are a setting in the app only (remote HTTPS images). Quick Look never loads one.
- Quick Look's policy forbids raw HTML, document stylesheets, outside resources, and relative file access, and its pages carry no script at all.
Everything it renders with is inside the app
- KaTeX for math, Mermaid for diagrams, and Highlight.js for code are bundled, along with the Renkara Document fonts: Plus Jakarta Sans and Fira Code.
- The two extensions carry the App Sandbox and the shared app group and no network entitlement. They start no other process.
- Galley collects no telemetry and has no account, no backend, and no analytics. The only connection it can make is the optional loopback one to Scriptorium on the same Mac, and the opt-in remote images.
- The app itself holds the network client entitlement, which those two opt-in features need. The extensions, where the unknown files are opened from Finder, do not.
How the pictures on this site were made
Launched with -GalleyDemo strataforge, Galley opens built-in documents about the invented StrataForge Robotics company, runs with no network, and shows a persistent Demo data bar. The mode turns on only from that launch argument, never from a setting or an environment variable. Every picture here is the real app in that mode, with nothing retouched.
What stands behind it
The package and the app have automated tests, run from the repository's own scripts, and the repository's status page records the result and the coverage of each library. The count and the coverage are the repository's to report; this site does not restate them.
Questions about this tool?
Write to Renkara Media Group and a person will answer.