Project

blogdoor

0.0
No commit activity in last 3 years
No release in over 3 years
Blogdoor is a toolkit for easily previewing posts.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

Blogdoor

Blogdoor is a toolkit for easily previewing posts.

Installation

$ gem install blogdoor

Usage

At your workspace, run blogdoor start.

$ cd path/to/workspace
$ blogdoor start

This command builds HTML files from your posts written by markdown and layout.erb. There are built HTML files under builds/ at current directory. If you want to preview them, open them by browser.

Additionally, the command starts websocket server on localhost:5678 for livereload. When a file has changed, browser will automatically reload the page.

Example

Below is the example of layout.erb. Feel free to customize it so that it looks like your blog.

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title><%= @title %></title>
</head>
<body>
  <article>
    <p class="when"><%= @created_at %></p>
    <h1><%= @title %></h1>
    <div class="article-body">
      <%= @content %>
    </div>
  </article>
</body>
</html>
  • @title: is injected the name of changed file.
  • @created_at: is injected the last update date of changed file.
  • @content: is injected the content of changed file.