Skip to content

Commit 7af5bd2

Browse files
committed
Replaced Lanyon to Jekyll commands
1 parent 7921967 commit 7af5bd2

File tree

1 file changed

+5
-30
lines changed

1 file changed

+5
-30
lines changed

Rakefile

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -18,41 +18,16 @@ task test: %i[test-news-plugin test-linter lint build]
1818

1919
desc "Build the Jekyll site"
2020
task :build do
21-
require "lanyon"
21+
require "jekyll"
2222

23-
Lanyon.build
24-
end
25-
26-
namespace :build do
27-
28-
def build_subpage(lang)
29-
require "yaml"
30-
require "lanyon"
31-
32-
exclude_config = YAML.load_file(CONFIG)["exclude"]
33-
exclude_langs = (LANGUAGES - [lang]).map {|x| "#{x}/" }
34-
35-
exclude = exclude_config + exclude_langs
36-
37-
Lanyon.build(exclude: exclude)
38-
end
39-
40-
desc "Build the Jekyll site (`lang' language part only)"
41-
task :lang do
42-
puts "Please specify one of the valid language codes:"
43-
puts LANGUAGES.join(", ") << "."
44-
end
45-
46-
LANGUAGES.each do |lang|
47-
task lang.to_sym do
48-
build_subpage(lang)
49-
end
50-
end
23+
Jekyll::Commands::Build.process({})
5124
end
5225

5326
desc "Serve the Jekyll site locally"
5427
task :serve do
55-
sh "rackup config.ru"
28+
require "jekyll"
29+
30+
Jekyll::Commands::Serve.process({})
5631
end
5732

5833
namespace :new_post do

0 commit comments

Comments
 (0)