require 'nokogiri'
use_helper Nanoc::Helpers::Breadcrumbs
+use_helper Nanoc::Helpers::Blogging
Xmlns = {
'xhtml' => 'http://www.w3.org/1999/xhtml'
}.freeze
+$counters = {}
def to_xhtml(subpath = "", item = @item)
if item.identifier =~ '/index.*'
if p.empty? then nil else p[0].xpath('string(.)') end
end
+def counter(name = :default, item = @item)
+ $counters[item] ||= {}
+ $counters[item][name] ||= 0
+
+ name.to_s.capitalize + " " + ($counters[item][name] += 1).to_s
+end
+
def human_filesize(size)
units = ["B", "KiB", "MiB", "GiB"]