Project

gmi2html

0.0
No release in over a year
Simple pure ruby Gemini to HTML convertor
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.2
~> 11.1
~> 13.0
~> 3.10
~> 1.23
~> 0.21
~> 0.9.26

Runtime

~> 1.0
 Project Readme

Gmi2html

This is a pure ruby Gemtext to HTML convertor, relying on the gemtext gem

Gemini

Gemtext is a simple plain text format, similar to Markdown but simpler. It is the official format for pages within Gemini capsules.

For more information on Gemini see the official page

Gemini official page Gemini specification

I've written a separate gem - jekyll-gemini which uses this gem for publishing from your Jekyll blog to a Gemini capsule.

Using Gmi2html

To convert a Gemtext string to an html string

require 'gmi2html'

html_string = Gmi2html::Document.new(my_gemtext_string).to_html

To convert a Gemtext file to an html string

require 'gmi2html'

html_string = File.open('capsule/my_gemtext.gmi', 'r') do |f|
  Gmi2html::Document.new(f).to_html
end

Status

Second release but should be feature complete

Supported

  • Paragraphs
  • Headings
  • Quotes
  • Whitespace
  • List items
  • Preformatted text
  • Syntax highlighted preformatted text