background preloader

Nanoc

Facebook Twitter

Posting Workflow

Home · nanoc/nanoc Wiki. Helpers & Plugins. Sample sites. Install. Instructions For The Impatient Install nanoc using Rubygems, like this: % gem install nanoc If the gem install command fails with a permission error, you likely have to prefix the command with sudo. Do not use sudo until you have tried the command without it; using sudo when not appropriate will damage your RubyGems installation.

For detailed instructions, read on! Installing Ruby nanoc is written in Ruby, so you will need to install a Ruby interpreter. Ruby may already be installed on your system. . % ruby --versionruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0]% To install Ruby, you have a few different options. Installing Rubygems Rubygems is Ruby’s package manager. It is likely that you have Rubygems installed already.

. % gem --version 2.2.0 % To install Rubygems, go to the Rubygems download page and follow the instructions there. Be sure what you have a fairly recent version of Rubygems. . % gem update --system Latest version currently installed. Installing nanoc From git. Tutorial. This tutorial takes approximately twenty minutes to complete. You need three things in order to follow the tutorial: a working nanoc installation Check out the Install page for details on how to install Ruby, RubyGems and nanoc. a basic understanding of Ruby nanoc uses the Ruby programming language extensively. A basic understanding of the command line nanoc is executed on the command line.

Create a site Create a new site by typing create-site, followed by the name of the new directory in which you want nanoc to create the site: % nanoc create-site tutorial nanoc lists all files being generated as result of this command: create nanoc.yaml create Rules create content/index.html create content/stylesheet.css create layouts/default.html Created a blank nanoc site at 'tutorial'. A nanoc-powered site is a directory with a specific structure.

Nanoc.yaml The YAML file that contains site-wide configuration details. Rules The Ruby file that describes how pages and assets will be processed. content/ layouts/ Documentation. Nanoc: a static site generator written in Ruby » home.