This is my current personal online publishing setup. I've added it to github to share to anyone else that may be looking for an easy-to-manage yet quite customizable statically generated publishing site*.
*I'm avoiding just calling it a "blog" because I'm planning on building in more features... like pdf generation.
I use middleman for static site generation in Ruby. Thanks to biblichor for the starter middleman template. Biblichor forked from headcanon's middleman-bower-template originally.
Also:
- Rendering engine
- Middleman plugins
- middleman-blog
- middleman-livereload
- middleman-target
- middleman-deploy config snippet to ease FTP/SFTP deployment
- Bower package management
##Installation
- You'll need ruby (I use 2.1.2) and rubygems (I use 2.2.2).
- Install the
middleman
gem - Download/clone blog-boostrap to
.middleman/blog-bootstrap
: - Download/clone this repo to wherever you put your projects.
- Install the assets in the
bower_components/
directory.
gem install middleman
git clone https://github.com/biblichor/middleman-blog-bootstrap-template.git ~/.middleman/blog-bootstrap
git clone https://github.com/payneio/read.git ~/{wherever you put your projects}/read
cd ~/{wherever you put your projects}/read
bower install
##Management
Start up the middleman server to see the live-reloading changes to your blog locally:
middleman server
Then, just write a new post in posts (in .md or .adoc).
When ready to publish:
middleman build
middleman deploy
##Configuration
###Blog configuration
- Edit
config.rb
as you like.
- Don't forget to add the site url, author, title, and subtitle(used as description too).
- To get analytics inclusion, simply add your account name to the appropriate places.
set :site_url, 'http://blog.url.com'
set :site_author, 'Blog author'
set :site_title, 'Blog title'
set :site_subtitle, 'Blog subtitle'
# set @analytics_account, like 'XX-12345678-9'
@analytics_account = false
###Bower configuration
- With bower, you can prevent unnecessary files being copied over to
build/
. - All bower packages are put in the
bower_components/
directory outside of the source. - By default, these assets are included:
- If you want another assets, edit
bower.json
as you like, and simplybower install
and include it like you would any other file in sprockets.
###Helpers configuration, etc.
- In
helpers/
, a few helpers are inclueded to help out with organizing the following information on your site.
- title
- meta keywords
- meta description
feed.xml
andsitemap.xml
enables you to tell your readers / search engines the update of articles.