Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 1.08 KB

README.md

File metadata and controls

48 lines (31 loc) · 1.08 KB

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