Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,29 @@ end

namespace :build do

desc "Build the Jekyll site (`en' language part only)"
task :en do
def build_subpage(lang)
require "yaml"
require "lanyon"

exclude_config = YAML.load_file(CONFIG)["exclude"]
exclude_langs = (LANGUAGES - ["en"]).map {|lang| "#{lang}/" }
exclude_langs = (LANGUAGES - [lang]).map {|x| "#{x}/" }

exclude = exclude_config + exclude_langs

Lanyon.build(exclude: exclude)
end

desc "Build the Jekyll site (`lang' language part only)"
task :lang do
puts 'Please specify one of the valid language codes:'
puts LANGUAGES.join(', ') << '.'
end

LANGUAGES.each do |lang|
task lang.to_sym do
build_subpage(lang)
end
end
end

desc "Serve the Jekyll site locally"
Expand Down