Hiding pages
It is sometimes useful to compile pages, but not let them show up in a sitemap or a feed. At Stoneship, the feed is hidden, so it doesn’t show up on the sitemap: only FeedBurner knows my hidden feed URL.
To do this, add is_hidden: "true" to the item’s meta file. By itself, this won’t do anything, but you can tell the sitemap and the feed to skip hidden pages.
For example, a sitemap? can be told to skip hidden pages by replacing the line…
<% @items.each do |item| %>
by…
<% @items.reject { |i| i[:is_hidden] }.each do |item| %>
The same can be applied to feeds, where you get all @items, select the articles, and reject the hidden items. nanoc's built-in helpers automatically ignore items that have is_hidden set to true.
