로컬에서는 _config_local.yml
을 사용하여 기본 URL 값을 대체 할 수 있습니다.
github:
url: http://localhost:4000
을 그리고 당신이 지킬를 시작할 수 있습니다와 같이 모두 설정 파일을 구문 분석 질문 :
당신의 _config_local.yml
이 추가
bundle exec jekyll build --config _config.yml, _config_local.yml
및
bundle exec jekyll serve --config _config.yml,_config_local.yml
옵션 : 명령의 별칭을 지정하거나 rake
을 사용하여 작업을 시작할 수 있습니다.
은 Gemfile
에 rake
보석을 추가 bundle install
가 Rakefile
만들기로
group :development do
gem 'rake'
end
설치 :에
touch Rakefile
복사이 내용을 당신의 Rakefile
:
require 'jekyll'
task :build do
options = {
'trace' => true,
'verbose' => true,
'config' => %w(_config.yml _config_local.yml)
}
Jekyll::Commands::Build.process(options)
end
task :serve do
options = {
'serving' => true,
'watch' => true,
'incremental' => true,
'config' => %w(_config.yml _config_local.yml)
}
Jekyll::Commands::Build.process(options)
Jekyll::Commands::Serve.process(options)
end
이제 옵션을 전달하지 않고도 bundle exec rake build
및 bundle exec rake serve
을 사용할 수 있습니다.
작품 : :) 고마워요! –