geml

GEML Viewer

A Chrome (MV3) extension that renders .geml and .gemlhistory documents in the browser — locally (file://) and on the web (http(s)://) — using the GEML reference parser, so what you see matches the spec exactly.

What it renders

Build

The extension bundles the parser’s compiled output, so build it first:

cd geml-parser && npm install && npm run build && cd ..
cd integrations/geml-viewer && npm install && npm run build

npm run build writes dist/viewer.bundle.js and copies KaTeX fonts to dist/fonts/. npm run package additionally produces geml-viewer-<version>.zip — manifest at the zip root, ready to upload to the Chrome Web Store.

Load in Chrome

  1. Go to chrome://extensions, enable Developer mode.
  2. Load unpacked → select this integrations/geml-viewer/ directory.
  3. To view local files, open the extension’s Details and turn on Allow access to file URLs.
  4. Open any .geml file over file:// (e.g. file:///…/GEML-spec.geml), or a raw .geml URL — the raw file, not the GitHub blob page (that one is HTML). Try the showcase (a computed table, four charts, a Mermaid flow, and math) or the GEML spec itself. For the interactive geml-code-graph, open playground/sample.geml with its codemap/ folder over file://.

How it works

.geml URL ─▶ content.js (guard: path ends .geml / plain-text page)
          ─▶ read original text (fetch, fallback to the page's <pre>)
          ─▶ parse()  [geml-parser core, bundled for the browser]
          ─▶ renderDocument(model, document)  [pure DOM, src/render.js]
          ─▶ replace the page + inject CSS
          ─▶ upgrade: KaTeX (math), Mermaid (diagrams), inline SVG (geml-chart)

Privacy

The extension collects no data — no telemetry, no page content, nothing transmitted anywhere. Details: PRIVACY.md.

Known limitations

Develop

npm test   # builds, then runs the linkedom renderer tests