File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 27
27
28
28
namespace :build do
29
29
30
- desc "Build the Jekyll site (`en' language part only)"
31
- task :en do
30
+ def build_subpage ( lang )
32
31
require "yaml"
33
32
require "lanyon"
34
33
35
34
exclude_config = YAML . load_file ( CONFIG ) [ "exclude" ]
36
- exclude_langs = ( LANGUAGES - [ "en" ] ) . map { |lang | "#{ lang } /" }
35
+ exclude_langs = ( LANGUAGES - [ lang ] ) . map { |x | "#{ x } /" }
37
36
38
37
exclude = exclude_config + exclude_langs
39
38
40
39
Lanyon . build ( exclude : exclude )
41
40
end
41
+
42
+ desc "Build the Jekyll site (`lang' language part only)"
43
+ task :lang do
44
+ puts 'Please specify one of the valid language codes:'
45
+ puts LANGUAGES . join ( ', ' ) << '.'
46
+ end
47
+
48
+ LANGUAGES . each do |lang |
49
+ task lang . to_sym do
50
+ build_subpage ( lang )
51
+ end
52
+ end
42
53
end
43
54
44
55
desc "Serve the Jekyll site locally"
You can’t perform that action at this time.
0 commit comments