Recipes
Each Nesta Recipe shows how to approach a common task, such as adding author biographies or setting up syntax highlighting. They include example code that you can use in your own site, or as inspiration for how to get the most out of Nesta.
The Recipes
-
Make a page that lists old articles
Out of the box, Nesta doesn't provide a page that lists all your old blog posts. It is however, easy to add one.
-
Setting up rack-codehighlighter
If you write about software, you can make code look more attractive by adding syntax highlighting to your pages. Nesta is a Sinatra app (and is therefore built on top of Rack), which makes it easy to setup syntax highlighting with the
rack-codehighlighter
gem. -
Refresh the browser when you save a file
Most of the pages on a Nesta site are written in a text editor, using Markdown or Textile. You don't get to see what your words look like on a web page you save the file to disk and reload your browser. Wouldn't it be nice if your browser automatically reloaded pages as you saved them? When designing a theme, what if changes to HTML and CSS were reloaded immediately?
-
Using an unreleased version of Nesta
You might want to use features that are in the development branch of Nesta but were not yet released as a gem, or you might want to use your own version of Nesta. This recipe will explain how.
-
Making an Art Directed blog
When Geoffrey Grosenbach released the new PeepCode blog it made quite a splash. Each article is beautifully presented with its own unique design. When he [wrote about][peepcode] how he'd based his blog on Nesta I got lots of questions asking how to achieve something similar.
-
Using a different Markdown processor
There are a handful of Markdown processing libraries available for Ruby, each with different advantages and features. Since version 0.9.11, Nesta uses Ryan Tomayko's [Tilt][] library to work out which processor to use when rendering a file within your
content
folder, which will try and pick a suitable processor for you. This recipe shows you how to change it. -
Adding author biographies to articles
Imagine for a moment that you run a blog that frequently runs articles from guest bloggers. They provide the content, and in return get some publicity and a link back to their own site from the bottom of their article. What's the best way to do this with Nesta?