Trifle::Docs
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
contentreturns rendered HTML.metaincludestoc,breadcrumbs, andupdated_at.- URLs follow your folder structure.