This is a fork of the nanoc3 Blog Starter Kit by Mario L. Gutierrez. His template provides an excellent starting point but lacks only a richer CSS styling framework. So this project adds the following features:
- Compass integration with the html5-boilerplate extension
- The Susy semantic CSS grid plugin for Compass
The main features of the original project are preserved, such as the handling of articles and archives, tag pages, and DISQUS integration. However, there are some some fixes too - Such as those mentioned in this article by Chris Kempson.
(See CHANGES.md for a complete list of changes.)
From the command line
% gem install bundler % git clone https://firstname.lastname@example.org/cearley/nanoc3_blog.git your_blog % cd your_blog % bundle install
Previewing the Site
Compile the site
# cleans output/ directory. `rm -rf output` works just as well % rake clean # compiles content/* and copies static/* to output/ % nanoc compile # runs preview server and autocompile on page refresh % nanoc aco
Preview the site on
Customizing Existing Content
Edit these two files:
content/about.md content/sticky.md # box content on front page
Delete articles to remove them from site. Then, recompile and restart server.
To change the front page:
To change the site layout:
To style the site:
Edit the Markdown file created by running this command:
# filename is written to console % rake create:article title='Hello world'
View your page after compiling or refresh in preview mode.
Adding Static Files
Put static files into the
static/ folder instead of
static/* is copied to the
output/ folder on compile and preview.
Edit these files:
DISQUS comment service allows users to post comments on your static site. As such, one must register your site on DISQUS to
use their service. Once registered, simply uncomment and adjust
config.yaml. Uncommenting this setting
enables comments in articles.
output/* to the public folder of your web server.
Or, if you use rsync:
# configuration is in config.yml rake deploy:rsync
Hyphens in file names are converted to subdirectories in the output. You decide how you want to organize your posts.
# e.g. These files render to the same output file. 2010-01-01-post.haml #=> 2010/01/01/post.html 2010/01-01-post.haml #=> 2010/01/01/post.html 2010/01/01-post.haml #=> 2010/01/01/post.html
Files may use Rails naming conventions, in which the first extension is retained for the output file and the second determines the template processor:
sitemap.xml.erb #=> generate sitemap.xml using erb processor
If a single extension is used, then the files are assumed to be CSS and HTML:
.sass #=> .css .* #=> .html