Marking up your pages
Making a new web page in Nesta is extremely easy, and the text behind
this very page is about as simple as it gets. It's just plain text. Have
a look at content-demo/pages/marking-up-pages.mdown
.
If you opened the file you may now be wondering where the links to the Markdown, Textile and Haml pages (that you should be able to see in your browser if you scroll down a bit) came from. It's quite simple really; they're just pages that have been assigned to the "Marking up your pages" category. Nesta is aware of this, and the theme you're using has chosen to link to them beneath these opening paragraphs of text.
If you look carefully, you'll also notice that the articles (i.e. pages with dates) that have been assigned to this page are listed in a separate section to plain web pages. You can customize this behaviour by copying a default template and tweaking a couple of lines of Ruby, but this isn't the place to get into that (but do check the docs).
-
Using Markdown
Markdown provides a simple way to write your copy in extremely legible plain text. The text can then be converted (by Nesta) to standards compliant HTML. Inline HTML is supported.
-
Using Textile
While similar to Markdown, Textile’s syntax is slightly closer to HTML, and allows you a bit more control over the HTML output. Inline HTML is supported.
-
Using Haml
Haml is an alternative syntax for HTML that has gained a large amount of traction in the Ruby community. Though not to everybody's taste, Haml is (primarily due to support for other markup languages) an ideal language for writing rich pages in Nesta.
-
Adding attachments
Attachments are easily included in your pages; you simply need to add the relevant HTML tag to link to include an image, video, or other document.
Articles on Marking up your pages
-
Anatomy of an article
This is an article about how to make an "article" (as distinct from a "page"). This article has been summarised with this short paragraph; if you click the "Show me more" link you'll be able to read the entire article. But wait! Before you move on, you should be able to see (if your current theme supports it) that this article was published on 25 December, and was added to a couple of categories.
Have a look at the top of
anatomy-of-an-article.mdown
to see how it's done…