1
0
Fork 0
mirror of https://github.com/fmap/muflax65ngodyewp.onion synced 2024-07-03 11:00:42 +02:00
muflax65ngodyewp.onion/lib/default.rb

28 lines
496 B
Ruby
Raw Normal View History

# Helper functions for site-building.
2011-07-31 22:51:41 +02:00
include Nanoc3::Helpers::Breadcrumbs
include Nanoc3::Helpers::Rendering
2011-07-31 22:51:41 +02:00
class Nanoc3::Item
def add_content content
@raw_content += "\n\n#{content}"
end
2011-07-31 22:51:41 +02:00
def add_references refs
add_content refs
2011-07-31 22:51:41 +02:00
end
def name
identifier.split("/").last
end
end
def category name
render "category", :category => name
end
# only articles that actually get printed
def printed_items
@items.select { |i| not i[:is_hidden] and not i.binary? }
end