0.0
The project is in a healthy, maintained state
Trifle::Docs is way too simple documentation app. It uses your markdown files and structure to build up your documentation. You can use it as a standalone app or mount it in your Rails app.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 2.1
>= 0
>= 0
~> 13.0
~> 3.2
= 1.0.0

Runtime

 Project Readme

Trifle::Docs

Gem Version Ruby

Simple router for static documentation. Map a folder of Markdown, textile, or other files to URLs and render them with minimal templates. Drop it into Rack, Rails, or Sinatra.

Part of the Trifle ecosystem.

Demo App

Quick Start

gem 'trifle-docs'

1. Configure

require 'trifle/docs'

Trifle::Docs.configure do |config|
  config.path = File.join(__dir__, 'docs')
  config.views = File.join(__dir__, 'templates')
  config.register_harvester(Trifle::Docs::Harvester::Markdown)
  config.register_harvester(Trifle::Docs::Harvester::File)
end

2. Create documentation structure

docs/
├── index.md
├── getting-started/
│   ├── index.md
│   └── installation.md
└── api/
    ├── index.md
    └── reference.md

3. Mount in your app

# Rack middleware
use Trifle::Docs::Middleware

# Rails
Rails.application.routes.draw do
  mount Trifle::Docs::Engine => '/docs'
end

4. Templates

<!-- templates/layout.erb -->
<!DOCTYPE html>
<html lang="en">
  <head><title>Docs</title></head>
  <body><%= yield %></body>
</html>

<!-- templates/page.erb -->
<%= content %>

Template variables: sitemap, collection, content, meta.

Features

  • File-based routing. Folder structure becomes URL paths.
  • Multiple harvesters. Markdown (with frontmatter), static files, custom processors.
  • Template system. ERB templates with layout support.
  • Flexible integration. Rack, Rails, Sinatra.
  • Navigation helpers. Automatic menu and breadcrumb generation.
  • Sitemap XML. Auto-generated with configurable base URL.

Documentation

Full guides and API reference at docs.trifle.io/trifle-docs

Trifle Ecosystem

Component What it does
Trifle App Dashboards, alerts, scheduled reports, AI-powered chat.
Trifle::Stats Time-series metrics for Ruby (Postgres, Redis, MongoDB, MySQL, SQLite).
Trifle CLI Terminal access to metrics. MCP server mode for AI agents.
Trifle::Traces Structured execution tracing for background jobs.
Trifle::Logs File-based log storage with ripgrep-powered search.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/trifle-io/trifle-docs.

License

The gem is available as open source under the terms of the MIT License.