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
|
# File 'lib/jekyll/multiple/languages/plugin.rb', line 13
def process
if !self.config['baseurl']
self.config['baseurl'] = ""
end
config['baseurl_root'] = self.config['baseurl']
baseurl_org = self.config['baseurl']
languages = self.config['languages']
dest_org = self.dest
self.config['lang'] = languages.first
puts
puts "Building site for default language: \"#{self.config['lang']}\" to: #{self.dest}"
process_org
languages.drop(1).each do |lang|
self.dest = self.dest + "/" + lang
self.config['baseurl'] = self.config['baseurl'] + "/" + lang
self.config['lang'] = lang
puts "Building site for language: \"#{self.config['lang']}\" to: #{self.dest}"
process_org
self.dest = dest_org
self.config['baseurl'] = baseurl_org
end
Jekyll.setlangs({})
puts 'Build complete'
end
|