Shinmun Blog - A lightweight file-based blog engine

Shinmun Blog Engine

December 1, 2024

Shinmun is a file-based blog engine built on Ruby and Rack. Posts are Markdown files with YAML frontmatter, tracked in Git, served dynamically or exported as static HTML.

Installation

gem install shinmun
shinmun init myblog
cd myblog && rackup

Visit http://localhost:9292 to see your blog.

Creating Posts

shinmun post 'Post Title'

Creates posts/YYYY/M/post-title.md with this structure:

---
date: 2024-12-01
category: Ruby
tags: tag1, tag2
title: Post Title
---
Your markdown content here.

Directory Layout

posts/          # Blog posts organized by year/month
pages/          # Static pages (about, etc.)
templates/      # ERB templates for rendering
public/         # CSS, images, static assets
config.ru       # Rack configuration

Code Highlighting

Use @@language followed by a blank line and indented code:

def greet(name)
  "Hello, #{name}!"
end

Rouge handles syntax highlighting for Ruby, JavaScript, Python, and 100+ languages.

Posted in category Ruby. Tagged with introduction, getting-started.


Categories

Archive