Creating a new page is easy:
- Open a new file in your editor.
- Enter some text (formatted as Markdown, Textile or Haml).
- Save the file in the
content/pages/directory with a
There's slightly more to it than that, so let's look at some examples.
You can create a web page by making a new Markdown, Textile or Haml file in the
An article or blog post is nothing special; it's just a web page that was published at a given time.
Attachments can be served directly from your site, and are stored in the
attachmentssub directory of your
Menus are optional; not all themes will necessarily use a menu, and you don't have to fill it in if you don't want to. Having said that, if you do, you'll need to know what to do.
A full list of the Nesta metadata, which allows you to organise your site into categories and convert simple web pages into blog posts.
Markdown is a wonderfully simple approach to creating web pages, written by John Gruber of Daring Fireball. You get on with the business of writing (without any fancy code) and Markdown takes care of producing clean, web standards compliant HTML.
Out of the box, Nesta doesn't provide a page that lists all your old blog posts. It is however, easy to add one.
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?
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
contentfolder, which will try and pick a suitable processor for you. This recipe shows you how to change it.
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?
It's easy to move pages with Nesta; you just move files around on disk and push your changes up to your web server. But what about all the old links to the page? You need to configure some HTTP redirects...