참고: Bundler
bundle install
Gemfile이 없는 경우:
1) Gemfile 작성
source 'https://rubygems.org'
gem 'nokogiri'
gem 'rack', '~> 2.2.4'
gem 'rspec'
2) 설치 실행
bundle install
에러 예시:
C:/Ruby34-x64/... NameError: uninitialized constant DidYouMean::SPELL_CHECKERS
해결:
에러 예시:
Invalid date '<%= Time.now.strftime('%Y-%m-%d %H:%M:%S %z') %>': ... does not have a valid date in the YAML front matter.
해결:
vendor/ 내부 템플릿이 빌드에 포함되지 않도록 설정
# _config.yml
exclude:
- vendor
# Gemfile
gem 'jekyll-sitemap'
# _config.yml
url: "https://insu97.github.io" # 자신의 GitHub Pages 도메인
plugins:
- jekyll-sitemap
# robots.txt (루트에 생성)
User-agent: *
Allow: /
Sitemap: https://insu97.github.io/sitemap.xml
bundle install
bundle exec jekyll serve
# http://localhost:4000/sitemap.xml 에서 확인
https://insu97.github.io/sitemap.xml 접속
- Google Search Console → Sitemaps에 제출_config.yml의 url은 실제 도메인으로 정확히 설정합니다.plugins에 jekyll-sitemap이 포함되어 있어야 자동 생성됩니다.