block is an integrated script for blog creation. It offers:
- writing articles in Git Flavored Markdown in vim
- generation of
- html
- atom feed
- synchronization with the web server
- display of the generated web page
block doesn't do much itself but relies on other tools to do most of its work. It depends on:
apt-get install rsync vim node-marked
git clone https://github.com/tpo/block.git
cd block
mkdir ~/.block && cp config ~/.block/config
vim ~/.block/config # configure to match your
# local context
now you can write your first article:
bin/block
article new # Write a new article
article to html "article" # Output article in html form
# to stdout.
article to atom "article.html" # Output html in atom form
# to stdout.
block # Edit new article and build
# blog and preview.
block home # Show block's home directory
# use as: cd "`block home`".
block publish # Publish blog.
block rebuild # Rebuild blog from articles.
~/.block/config # Configuration file. Needs to
# set the following variables:
block_home=/home/joe/block # Path to block directory
block_dst=srv.example.org:website/
# Rsync style destination, where
# the generated site will be
# rsynced to.
block_url=http://www.example.org/
# Site URL
# rsynced to.
block/input/articles # your articles
block/input/bits # stuff (images etc.) that you can
# refer to from youryour articles
block/input/templates # templates from which the html pages
# and the atom feed will be
# assembled. You'll want to edit
# these.
project home: https://github.com/tpo/block