Skip to content

Commit

Permalink
Upgrade to Jekyll 3
Browse files Browse the repository at this point in the history
Full list of changes is at https://jekyllrb.com/docs/upgrading/2-to-3/. The tl;dr of it is:
 - Relative permalinks were removed, so all the files in the `docs` subdirectory need their permalink to be prefixed with `docs/`
 - `post` and `page` types were renamed to `posts` and `pages` respectively
 - `jekyll-paginate`, `pygments` and `redcarpet` are all now optional, so I needed to explicitly add it to the Gemfile. Jekyll now uses `rouge` rather than `pygments` for syntax highlighting, but rouge does not support highlighting individual lines (`hl_lines`) so we need to continue using Pygments.
 - Layout metadata (eg. `sectionid`) is now on a `layout` variable rather than `page`

Tested the following pages and confirmed that they all work:
 - "Docs" link (getting started page): http://127.0.0.1:4000/react/docs/getting-started.html
 - Downloads: http://127.0.0.1:4000/react/downloads.html
 - Tutorial: http://127.0.0.1:4000/react/docs/tutorial.html
 - A few pages under the "docs" subdirectory, to confirm they're working properly:
    - http://127.0.0.1:4000/react/docs/addons.html
 - http://127.0.0.1:4000/react/docs/why-react.html
 - http://127.0.0.1:4000/react/docs/create-fragment.html
 - A few tips:
    - http://127.0.0.1:4000/react/tips/false-in-jsx.html
 - http://127.0.0.1:4000/react/tips/style-props-value-px.html
 - Non-English versions of the page:
    - http://127.0.0.1:4000/react/docs/getting-started-it-IT.html
    - http://127.0.0.1:4000/react/docs/getting-started-ja-JP.html
  • Loading branch information
Daniel15 authored and zpao committed Jul 19, 2016
1 parent c3ce0f2 commit 6d537e9
Show file tree
Hide file tree
Showing 242 changed files with 299 additions and 305 deletions.
16 changes: 13 additions & 3 deletions docs/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ source 'https://rubygems.org'
gem 'rake'

# jekyll, which builds it all
# 2.0 includes sass processing
gem 'jekyll', '~>2.0'
# 3.0 includes sass processing
gem 'jekyll', '~>3.1'

# Auto redirect pages
# Jekyll extensions
gem 'jekyll-redirect-from'
gem 'jekyll-paginate'

# JSON
gem 'json'
Expand All @@ -17,3 +18,12 @@ gem 'rb-fsevent'

# For markdown header cleanup
gem 'sanitize', '~>2.0'

# Markdown
gem 'redcarpet'

# Syntax highlighting
gem 'pygments.rb'

# Avoid having to poll for changes on Windows
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
102 changes: 43 additions & 59 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,85 +1,69 @@
GEM
remote: https://rubygems.org/
specs:
blankslate (2.1.2.4)
celluloid (0.15.2)
timers (~> 1.1.0)
classifier (1.3.4)
fast-stemmer (>= 1.0.0)
coffee-script (2.3.0)
coffee-script-source
execjs
coffee-script-source (1.7.1)
colorator (0.1)
execjs (2.2.1)
fast-stemmer (1.0.2)
ffi (1.9.3)
jekyll (2.2.0)
classifier (~> 1.3)
ffi (1.9.10)
ffi (1.9.10-x64-mingw32)
jekyll (3.1.3)
colorator (~> 0.1)
jekyll-coffeescript (~> 1.0)
jekyll-gist (~> 1.0)
jekyll-paginate (~> 1.0)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
liquid (~> 2.6.1)
liquid (~> 3.0)
mercenary (~> 0.3.3)
pygments.rb (~> 0.6.0)
redcarpet (~> 3.1)
rouge (~> 1.7)
safe_yaml (~> 1.0)
toml (~> 0.1.0)
jekyll-coffeescript (1.0.0)
coffee-script (~> 2.2)
jekyll-gist (1.1.0)
jekyll-paginate (1.0.0)
jekyll-redirect-from (0.5.0)
jekyll (~> 2.0)
jekyll-sass-converter (1.2.0)
sass (~> 3.2)
jekyll-watch (1.1.0)
listen (~> 2.7)
json (1.8.1)
kramdown (1.4.1)
liquid (2.6.1)
listen (2.7.9)
celluloid (>= 0.15.2)
jekyll-paginate (1.1.0)
jekyll-redirect-from (0.10.0)
jekyll (>= 2.0)
jekyll-sass-converter (1.4.0)
sass (~> 3.4)
jekyll-watch (1.3.1)
listen (~> 3.0)
json (1.8.3)
kramdown (1.10.0)
liquid (3.0.6)
listen (3.1.1)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
mercenary (0.3.4)
mini_portile (0.6.0)
nokogiri (1.6.3.1)
mini_portile (= 0.6.0)
parslet (1.5.0)
blankslate (~> 2.0)
posix-spawn (0.3.9)
pygments.rb (0.6.0)
rb-inotify (>= 0.9.7)
mercenary (0.3.6)
mini_portile2 (2.0.0)
nokogiri (1.6.7.2)
mini_portile2 (~> 2.0.0.rc2)
nokogiri (1.6.7.2-x64-mingw32)
mini_portile2 (~> 2.0.0.rc2)
posix-spawn (0.3.11)
pygments.rb (0.6.3)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.1.0)
rake (10.3.2)
rb-fsevent (0.9.4)
rb-inotify (0.9.5)
yajl-ruby (~> 1.2.0)
rake (11.1.2)
rb-fsevent (0.9.7)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
redcarpet (3.1.2)
redcarpet (3.3.4)
rouge (1.10.1)
safe_yaml (1.0.4)
sanitize (2.0.6)
sanitize (2.1.0)
nokogiri (>= 1.4.4)
sass (3.3.14)
timers (1.1.0)
toml (0.1.1)
parslet (~> 1.5.0)
yajl-ruby (1.1.0)
sass (3.4.22)
wdm (0.1.1)
yajl-ruby (1.2.1)

PLATFORMS
ruby
x64-mingw32

DEPENDENCIES
jekyll (~> 2.0)
jekyll (~> 3.1)
jekyll-paginate
jekyll-redirect-from
json
pygments.rb
rake
rb-fsevent
redcarpet
sanitize (~> 2.0)
wdm (>= 0.1.0)

BUNDLED WITH
1.10.1
1.11.2
6 changes: 3 additions & 3 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@ url: https://facebook.github.io
baseurl: "/react"
permalink: "/blog/:year/:month/:day/:title.html"
paginate_path: "/blog/page:num/"
relative_permalinks: true
paginate: 5
timezone: America/Los_Angeles
highlighter: pygments
defaults:
- scope:
path: ''
type: post
type: posts
values:
layout: post
- scope:
path: docs
type: page
type: pages
values:
layout: docs
exclude:
Expand All @@ -36,6 +35,7 @@ sass:
sass_dir: _css
gems:
- jekyll-redirect-from
- jekyll-paginate
react_version: 15.2.1
react_hashes:
dev: g2900ZIpFKhyIsz+bnx4YDEfAISugYRU58ljeAgI8TZ0A0AkRLGUCN7OmjF16Cj+
Expand Down
4 changes: 2 additions & 2 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@
React
</a>
<ul class="nav-site nav-site-internal">
<li><a href="/react/docs/getting-started.html"{% if page.sectionid == 'docs' or page.sectionid == 'tips' or page.sectionid == 'contributing' %} class="active"{% endif %}>Docs</a></li>
<li><a href="/react/docs/getting-started.html"{% if layout.sectionid == 'docs' or layout.sectionid == 'tips' or layout.sectionid == 'contributing' %} class="active"{% endif %}>Docs</a></li>
<li><a href="/react/support.html"{% if page.id == 'support' %} class="active"{% endif %}>Support</a></li>
<li><a href="/react/downloads.html"{% if page.id == 'downloads' %} class="active"{% endif %}>Download</a></li>
<li><a href="/react/blog/"{% if page.sectionid == 'blog' %} class="active"{% endif %}>Blog</a></li>
<li><a href="/react/blog/"{% if layout.sectionid == 'blog' %} class="active"{% endif %}>Blog</a></li>
<li>
<input id="algolia-doc-search" type="text" placeholder="Search docs..." />
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/_plugins/authors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
module Authors
class Generator < Jekyll::Generator
def generate(site)
site.posts.each do |post|
site.posts.docs.each do |post|
authors = []
if post['author'].kind_of?(Array)
for author in post['author']
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/01-why-react.de-DE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: why-react-de-DE
title: Warum React?
permalink: why-react-de-DE.html
permalink: docs/why-react-de-DE.html
---
React ist eine JavaScript-Bibliothek von Facebook und Instagram für Benutzeroberflächen. Man kann sich React als das **V** in **[MVC](https://de.wikipedia.org/wiki/Model_View_Controller)** vorstellen.

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/01-why-react.it-IT.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: why-react-it-IT
title: Perché React?
permalink: why-react-it-IT.html
permalink: docs/why-react-it-IT.html
next: displaying-data-it-IT.html
---
React è una libreria JavaScript per creare interfacce utente scritta da Facebook e Instagram. A molti piace pensare a React come alla **V** di **[MVC](https://it.wikipedia.org/wiki/Model-View-Controller)**.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/01-why-react.ja-JP.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: why-react-ja-JP
title: なぜReactを使うのでしょうか?
permalink: why-react-ja-JP.html
permalink: docs/why-react-ja-JP.html
next: displaying-data-ja-JP.html

---
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/01-why-react.ko-KR.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: why-react-ko-KR
title: 왜 React인가?
permalink: why-react-ko-KR.html
permalink: docs/why-react-ko-KR.html
next: displaying-data-ko-KR.html
---

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/01-why-react.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: why-react
title: Why React?
permalink: why-react.html
permalink: docs/why-react.html
next: displaying-data.html
---
React is a JavaScript library for creating user interfaces by Facebook and Instagram. Many people choose to think of React as the **V** in **[MVC](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller)**.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/01-why-react.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: why-react-zh-CN
title: 为什么使用 React?
permalink: why-react-zh-CN.html
permalink: docs/why-react-zh-CN.html
next: displaying-data-zh-CN.html
---
React 是一个 Facebook 和 Instagram 用来创建用户界面的 JavaScript 库。很多人选择将 React 认为是 **[MVC](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller)** 中的 **V**(视图)。
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/02-displaying-data.it-IT.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: displaying-data-it-IT
title: Visualizzare Dati
permalink: displaying-data-it-IT.html
permalink: docs/displaying-data-it-IT.html
prev: why-react-it-IT.html
next: jsx-in-depth-it-IT.html
---
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/02-displaying-data.ja-JP.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: displaying-data-ja-JP
title: データを表示する
permalink: displaying-data-ja-JP.html
permalink: docs/displaying-data-ja-JP.html
prev: why-react-ja-JP.html
next: jsx-in-depth-ja-JP.html

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/02-displaying-data.ko-KR.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: displaying-data-ko-KR
title: 데이터를 표시하기
permalink: displaying-data-ko-KR.html
permalink: docs/displaying-data-ko-KR.html
prev: why-react-ko-KR.html
next: jsx-in-depth-ko-KR.html
---
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/02-displaying-data.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: displaying-data
title: Displaying Data
permalink: displaying-data.html
permalink: docs/displaying-data.html
prev: why-react.html
next: jsx-in-depth.html
---
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/02-displaying-data.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: displaying-data-zh-CN
title: 显示数据
permalink: displaying-data-zh-CN.html
permalink: docs/displaying-data-zh-CN.html
prev: why-react-zh-CN.html
next: jsx-in-depth-zh-CN.html
---
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/02.1-jsx-in-depth.it-IT.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: jsx-in-depth-it-IT
title: JSX in Profondità
permalink: jsx-in-depth-it-IT.html
permalink: docs/jsx-in-depth-it-IT.html
prev: displaying-data-it-IT.html
next: jsx-spread-it-IT.html
---
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/02.1-jsx-in-depth.ja-JP.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: jsx-in-depth
title: JSXの深層
permalink: jsx-in-depth-ja-JP.html
permalink: docs/jsx-in-depth-ja-JP.html
prev: displaying-data-ja-JP.html
next: jsx-spread-ja_JP.html
---
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/02.1-jsx-in-depth.ko-KR.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: jsx-in-depth-ko-KR
title: JSX 깊이보기
permalink: jsx-in-depth-ko-KR.html
permalink: docs/jsx-in-depth-ko-KR.html
prev: displaying-data-ko-KR.html
next: jsx-spread-ko-KR.html
---
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/02.1-jsx-in-depth.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: jsx-in-depth
title: JSX in Depth
permalink: jsx-in-depth.html
permalink: docs/jsx-in-depth.html
prev: displaying-data.html
next: jsx-spread.html
---
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/02.1-jsx-in-depth.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: jsx-in-depth-zh-CN
title: 深入 JSX
permalink: jsx-in-depth-zh-CN.html
permalink: docs/jsx-in-depth-zh-CN.html
prev: displaying-data-zh-CN.html
next: jsx-spread-zh-CN.html
---
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/02.2-jsx-spread.it-IT.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: jsx-spread-it-IT
title: Attributi Spread JSX
permalink: jsx-spread-it-IT.html
permalink: docs/jsx-spread-it-IT.html
prev: jsx-in-depth-it-IT.html
next: jsx-gotchas-it-IT.html
---
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/02.2-jsx-spread.ja-JP.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: jsx-spread
title: JSXの拡張属性
permalink: jsx-spread-ja-JP.html
permalink: docs/jsx-spread-ja-JP.html
prev: jsx-in-depth-ja-JP.html
next: jsx-gotchas-ja-JP.html
---
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/02.2-jsx-spread.ko-KR.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: jsx-spread-ko-KR
title: JSX 스프레드 어트리뷰트
permalink: jsx-spread-ko-KR.html
permalink: docs/jsx-spread-ko-KR.html
prev: jsx-in-depth-ko-KR.html
next: jsx-gotchas-ko-KR.html
---
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/02.2-jsx-spread.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: jsx-spread
title: JSX Spread Attributes
permalink: jsx-spread.html
permalink: docs/jsx-spread.html
prev: jsx-in-depth.html
next: jsx-gotchas.html
---
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/02.2-jsx-spread.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: jsx-spread-zh-CN
title: JSX 展开属性
permalink: jsx-spread-zh-CN.html
permalink: docs/jsx-spread-zh-CN.html
prev: jsx-in-depth-zh-CN.html
next: jsx-gotchas-zh-CN.html
---
Expand Down
Loading

0 comments on commit 6d537e9

Please sign in to comment.