diff --git a/docs/_config.yml b/docs/_config.yml index e91ae126cc3..fe500a58387 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,60 +1,49 @@ -sass: - style: compressed - -version: 3.7.0 # latest version displayed in header +--- +version: 3.7.0 +name: Jekyll • Simple, blog-aware, static sites +description: Transform your plain text into static websites and blogs +url: https://jekyllrb.com +repository: https://github.com/jekyll/jekyll +timezone: America/Los_Angeles +twitter: + username: jekyllrb +logo: "/img/logo-2x.png" gauges_id: 503c5af6613f5d0f19000027 google_analytics_id: UA-50755011-1 google_site_verification: onQcXpAvtHBrUI5LlroHNE_FP0b2qvFyPq7VZw36iEY - -repository: https://github.com/jekyll/jekyll - -timezone: America/Los_Angeles - -defaults: - - - scope: - path: "_docs" - type: "docs" - values: - layout: "docs" - - - scope: - path: "_posts" - type: "posts" - values: - layout: "news_item" - image: /img/twitter-card.png - collections: docs: - permalink: /:collection/:path/ + permalink: "/:collection/:path/" output: true posts: - permalink: /news/:year/:month/:day/:title/ + permalink: "/news/:year/:month/:day/:title/" output: true tutorials: output: true - -name: Jekyll • Simple, blog-aware, static sites -description: Transform your plain text into static websites and blogs -url: https://jekyllrb.com - -twitter: - username: jekyllrb - -logo: /img/logo-2x.png - +defaults: +- scope: + path: _docs + type: docs + values: + layout: docs +- scope: + path: _posts + type: posts + values: + layout: news_item + image: "/img/twitter-card.png" plugins: - - jekyll-avatar - - jekyll-feed - - jekyll-mentions - - jekyll-redirect-from - - jekyll-seo-tag - - jekyll-sitemap - - jemoji - +- jekyll-avatar +- jekyll-feed +- jekyll-mentions +- jekyll-redirect-from +- jekyll-seo-tag +- jekyll-sitemap +- jemoji +sass: + style: compressed exclude: - - .gitignore - - CNAME - - icomoon-selection.json - - readme.md +- ".gitignore" +- CNAME +- icomoon-selection.json +- readme.md diff --git a/rake/site.rake b/rake/site.rake index 05be2f7f233..87299a3a5ef 100644 --- a/rake/site.rake +++ b/rake/site.rake @@ -87,9 +87,11 @@ namespace :site do desc "Write the latest Jekyll version" task :latest_version do return if version =~ %r!(beta|rc|alpha)!i + require "safe_yaml/load" config_file = File.join(docs_folder, "_config.yml") - contents = File.read(config_file) - File.write(config_file, contents.sub(%r!(?:version\s*:\s+)(.+)!, "version: #{version}")) + config = SafeYAML.load_file(config_file) + config["version"] = version + File.write(config_file, YAML.dump(config)) File.open("#{docs_folder}/latest_version.txt", "wb") { |f| f.puts(version) } end