Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsJul 8, 2026·3 min de lecture

Middleman — Ruby-Powered Static Site Generator

A flexible static site generator built with Ruby, offering templating, asset pipelines, and an extension ecosystem for building fast, maintainable websites.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Middleman Static Sites
Commande d'installation directe
npx -y tokrepo@latest install 73644829-7a64-11f1-9bc6-00163e2b0d79 --target codex

À exécuter après confirmation du plan en dry-run.

Introduction

Middleman is a static site generator written in Ruby that combines the convenience of dynamic frameworks like Rails with the performance and security of static HTML output. It is well suited for marketing sites, documentation, blogs, and any project where pre-built HTML is preferred over server-side rendering.

What Middleman Does

  • Generates static HTML, CSS, and JavaScript from templates and data files
  • Supports ERB, Haml, Slim, and Markdown for templating
  • Provides a built-in development server with live reload
  • Includes an asset pipeline with Sprockets or Webpack for JS and CSS bundling
  • Offers a rich extension ecosystem for blogging, sitemaps, i18n, and deployment

Architecture Overview

Middleman runs as a Ruby application that processes a source directory of templates, partials, layouts, and data files into a static build directory. During development it serves content through a Rack-based server with automatic rebuilds on file changes. The build process compiles templates, processes the asset pipeline, applies extensions, and writes the final output as plain HTML files ready for any static hosting service.

Self-Hosting & Configuration

  • Install via RubyGems with gem install middleman or add it to a project Gemfile
  • Configure through config.rb in the project root for build settings and extensions
  • Use data files in YAML or JSON format under the data/ directory for dynamic content
  • Deploy the build/ output to any static host such as Netlify, S3, or a plain web server
  • Extend functionality by adding gems for blogging, search, or deploy automation

Key Features

  • Mature and stable framework with over a decade of active development
  • Flexible templating with support for multiple template languages and partials
  • Built-in blogging extension with tags, pagination, and feeds
  • Proxy pages and dynamic pages generated from data files
  • Strong community with hundreds of extensions and starter templates

Comparison with Similar Tools

  • Jekyll — simpler with tight GitHub Pages integration; Middleman offers more flexibility and a richer asset pipeline
  • Hugo — faster builds with Go; Middleman provides deeper Ruby ecosystem integration
  • Gatsby — React-based with GraphQL; Middleman is lighter and does not require a JavaScript framework
  • Eleventy — JavaScript-native with minimal opinions; Middleman has a more opinionated but productive workflow
  • Astro — modern component-based approach; Middleman suits teams already invested in Ruby

FAQ

Q: Is Middleman still actively maintained? A: Yes, Middleman continues to receive updates and has a stable v4 release with ongoing community support.

Q: How does Middleman compare in build speed to Hugo? A: Hugo is significantly faster for large sites due to its Go-based engine. Middleman is fast enough for most projects but may slow down on sites with thousands of pages.

Q: Can I use Middleman with a headless CMS? A: Yes, you can pull content from any headless CMS via its API during the build step using data files or custom extensions.

Q: Does Middleman support incremental builds? A: Middleman does not have native incremental builds, but its development server only recompiles changed files during the preview cycle.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires