Project

browsedown

0.0
The project is in a healthy, maintained state
A Rails engine that serves and renders markdown files from a directory tree.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 6.0
~> 3.5
 Project Readme

Browsedown

A Rails engine that serves a directory of markdown files as a browsable documentation site.

Point it at a folder, mount it in your routes, and your .md files become readable in the browser.

Installation

Add to your Gemfile:

gem "browsedown"

Usage

Mount it in config/routes.rb:

mount Browsedown["docs"] => "/documentation"

This serves all .md files under Rails.root/docs at /documentation.

The path argument is relative to Rails.root:

Browsedown["content/guides"]  # => Rails.root/content/guides

How it works

  • Scans the directory tree for *.md files
  • Renders markdown to HTML using Redcarpet (fenced code blocks, tables, autolinks, strikethrough)
  • Displays a sidebar with links to every page
  • Shows README.md as the landing page if one exists
  • requests outside the configured root return 404

Requirements

  • Ruby >= 3.0
  • Rails >= 6.0

License

MIT