Trifle::Docs

Gem Version Ruby

Trifle::Docs is a lightweight router and renderer for static documentation inside Ruby apps.

What it does

  • Maps a folder of Markdown/textile/static files to URLs.
  • Generates metadata (TOC, breadcrumbs, updated_at) for navigation and search.
  • Lets you plug in custom harvesters for new formats.

Quick example

Trifle::Docs.configure do |config|
  config.path = Rails.root.join('docs')
  config.register_harvester(Trifle::Docs::Harvester::Markdown)
end

html = Trifle::Docs.content(url: 'getting_started')
meta = Trifle::Docs.meta(url: 'getting_started')

What to expect

  • content returns rendered HTML.
  • meta includes toc, breadcrumbs, and updated_at.
  • URLs follow your folder structure.

Next steps