Building a Blog with Phoenix and NimblePublisher

Learn how to create a fast, elegant blog using Phoenix Framework and NimblePublisher

John Smith
elixir phoenix tutorial

Introduction

Building a blog doesn’t have to be complicated. With Phoenix Framework and NimblePublisher, you can create a blazing-fast, maintainable blog that compiles your markdown posts at build time.

Why NimblePublisher?

NimblePublisher is a minimal filesystem-based publishing engine with support for:

  • Markdown parsing and syntax highlighting
  • Fast compilation - all posts are compiled at build time
  • Type-safe - posts are validated structs
  • Simple - just drop markdown files in a directory

Getting Started

First, add NimblePublisher to your dependencies:

{:nimble_publisher, "~> 1.0"}

Then define your post structure and configure the publisher in your context module. It’s that simple!

The Result

You get a blog that:

  • Loads instantly (no database queries!)
  • Has beautiful syntax highlighting
  • Is easy to maintain
  • Scales effortlessly

Check out the source code of this blog to see it in action!