Skip to content

Commit 2d7f5cb

Browse files
committed
chore: add serve task to Rakefile
This commit introduces a new Rake task named `serve` that allows developers to quickly start a local Jekyll server for testing and previewing the website.
1 parent a6c768a commit 2d7f5cb

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Rakefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@ task :build do
1414
Jekyll::Commands::Build.build(site, config)
1515
end
1616

17+
desc 'serve the Jekyll project with live reload'
18+
task :serve do
19+
config = Jekyll.configuration(
20+
'watch' => true,
21+
'serving' => true,
22+
'port' => 4000,
23+
'host' => '127.0.0.1'
24+
)
25+
26+
Jekyll::Commands::Serve.process(config)
27+
end
28+
1729
desc 'run playwright tests'
1830
task :test do
1931
sh 'npx playwright test'

0 commit comments

Comments
 (0)