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 :)
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
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 onlocalhost:5173
- enjoy!
- button to switch between input and render on mobile
- clean up styling and weird overflows
- improve parser performance
- things are sorta slow when the parser starts, all advice welcome!
- styling is fairly rudimentary