all repos — h3rald @ bd4258ad03df04c65f3b50da846b3d558dbb837b

The sources of https://h3rald.com

Rules

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
#!/usr/bin/env ruby

compile /archives/ do
	rep.filter :erb
	layout 'default'
end

compile /\/(home|projects|about)/ do
	rep.filter :erb
	rep.filter :redcloth
	layout 'default'
end

compile /(rss|atom)/ do
	rep.filter :erb
end

compile '/css/*' do
	filter :sass, {
    :load_paths => [Dir.pwd+"/content/css"],
    :full_exception => true,
    :line_numbers => true
  }
end

compile 'sitemap' do
	rep.filter :erb
end

compile /\/(js\/.+?|.htaccess|robots.txt)/ do
	# do nothing
end

	
compile '*' do
	if item[:filters_pre] && !item[:filters_pre].empty? then
		item[:filters_pre].each do |f|
			rep.filter f.to_sym
		end
	else
		rep.filter :redcloth
	end
	layout 'default'
end

route /\/tags\/.+?-(atom|rss)/ do
	item.identifier.gsub(/(.+)-(rss|atom)\/$/, '\1/\2') + '.xml'
end

route '/(atom|rss)/' do
	item.identifier.gsub(/\/$/, '') + '.xml'
end

route 'css/*' do
	item.identifier.gsub(/\/$/, '') + '.css'
end

route 'sitemap' do
	item.identifier.gsub(/\/$/, '') + '.xml'
end

route '/js/*' do
	item.identifier.gsub(/\/$/, '') + '.js'
end

route 'robots.txt' do
	item.identifier.gsub(/\/$/, '') + '.txt'
end

route '*' do
  item.identifier + 'index.html'
end

layout '*', :erb