mirror of
https://github.com/fmap/muflax65ngodyewp.onion
synced 2024-06-26 10:26:48 +02:00
site config in sites.yaml
This commit is contained in:
parent
b09cceb7d3
commit
8543ac3e69
|
@ -21,6 +21,7 @@ module ::Nanoc
|
||||||
puts "load extended config..."
|
puts "load extended config..."
|
||||||
|
|
||||||
@name = site
|
@name = site
|
||||||
|
@site_yaml = YAML.load(File.open("sites.yaml"))
|
||||||
|
|
||||||
@config[:output_dir] = "out/#{site}"
|
@config[:output_dir] = "out/#{site}"
|
||||||
|
|
||||||
|
@ -61,21 +62,14 @@ module ::Nanoc
|
||||||
!main_site? # everything is a blog except for the main site
|
!main_site? # everything is a blog except for the main site
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def [](attr)
|
||||||
|
@site_yaml["sites"][@name][attr]
|
||||||
|
end
|
||||||
|
|
||||||
def disqus_site
|
def disqus_site
|
||||||
# TODO merge them all?
|
# TODO merge them all?
|
||||||
# site -> disqus shortname
|
# site -> disqus shortname
|
||||||
case @name
|
self["disqus_site"]
|
||||||
when "muflax"
|
|
||||||
"muflax"
|
|
||||||
when "sutra"
|
|
||||||
"muflaxsutra"
|
|
||||||
when "daily"
|
|
||||||
"dailymuflax"
|
|
||||||
when "blog"
|
|
||||||
"muflaxblog"
|
|
||||||
else # put 'em on the main site
|
|
||||||
"muflax"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def url
|
def url
|
||||||
|
@ -87,18 +81,7 @@ module ::Nanoc
|
||||||
end
|
end
|
||||||
|
|
||||||
def title
|
def title
|
||||||
case @name
|
self["title"]
|
||||||
when "muflax"
|
|
||||||
"lies and wonderland"
|
|
||||||
when "sutra"
|
|
||||||
"Blogchen"
|
|
||||||
when "daily"
|
|
||||||
"muflax becomes a saint"
|
|
||||||
when "blog"
|
|
||||||
"muflax' mindstream"
|
|
||||||
else # placeholder
|
|
||||||
"muflaxia"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
18
sites.yaml
Normal file
18
sites.yaml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
sites:
|
||||||
|
muflax:
|
||||||
|
title: lies and wonderland
|
||||||
|
disqus_site: muflax
|
||||||
|
blog:
|
||||||
|
title: muflax\' mindstream
|
||||||
|
disqus_site: muflaxblog
|
||||||
|
sutra:
|
||||||
|
title: Blogchen
|
||||||
|
disqus_site: muflaxsutra
|
||||||
|
daily:
|
||||||
|
title: muflax becomes a saint
|
||||||
|
disqus_site: dailymuflax
|
||||||
|
letsread:
|
||||||
|
title: Let\'s Read
|
||||||
|
disqus_site: muflaxread
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue