gmi-viewer Svelte Themes

Gmi Viewer

๐ŸŒ Web-based gemini protocol text viewer

gmi-viewer

A web application used to view and edit text/gemini content, described in ยง 5 of Gemini's spec.

This project is more-or-less an excuse to learn how to parse and display a specific content type. Gemini's file spec is very simple, so it's a good candidate to learn from :)

features

This project can render the following line types defined in the Gemini spec:

  • Text lines (ยง 5.4.1)
  • Link lines (ยง 5.4.2)
  • Preformatted toggle lines (ยง 5.4.3)
  • Preformatted text lines (ยง 5.4.4)
  • Heading lines (ยง 5.5.1)
  • Unordered list items (ยง 5.5.2)
  • Quote lines (ยง 5.5.3)

Additionally, this project provides a few QOL tweaks:

  • Stores current text input in localStorage, under the gmi-viewer:content key

usage

Visit https://webcrawls.github.io/gmi-viewer to try it out!

Otherwise, if you're looking to run it locally:

  • git clone the repository
  • run npm install in the project root
  • run npm run dev to start a local server, probably on localhost:5173
  • enjoy!

todo

  • button to switch between input and render on mobile
  • clean up styling and weird overflows
  • improve parser performance

caveats

  • things are sorta slow when the parser starts, all advice welcome!
  • styling is fairly rudimentary

Top categories

Loading Svelte Themes