# coding: utf-8 require 'config' require 'sitegen' module Sitegen def self.html_escape(html) html .gsub('&', '&') .gsub('>', '>') .gsub('<', '<') end def self.breadcrumbs(url) path = url.path path = "/" if path == "" bc = [] while true a = 'out'+path b = ('out'+path+'/index.html').gsub('//', '/') page = @local[a] || @local[b] bc.unshift("#{page.atom_title}") break if path == "/" path = File::dirname(path) end return bc.join(' ยป ') end end