From d4572018622d85a69d5b755cb7939cb8dfba1d92 Mon Sep 17 00:00:00 2001 From: Daniel Lo Nigro Date: Sun, 24 Apr 2016 19:16:06 -0700 Subject: [PATCH] Upgrade to Jekyll 3 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 --- Gemfile | 16 ++- Gemfile.lock | 102 ++++++++---------- _config.yml | 6 +- _layouts/default.html | 4 +- _plugins/authors.rb | 2 +- docs/01-why-react.de-DE.md | 2 +- docs/01-why-react.it-IT.md | 2 +- docs/01-why-react.ja-JP.md | 2 +- docs/01-why-react.ko-KR.md | 2 +- docs/01-why-react.md | 2 +- docs/01-why-react.zh-CN.md | 2 +- docs/02-displaying-data.it-IT.md | 2 +- docs/02-displaying-data.ja-JP.md | 2 +- docs/02-displaying-data.ko-KR.md | 2 +- docs/02-displaying-data.md | 2 +- docs/02-displaying-data.zh-CN.md | 2 +- docs/02.1-jsx-in-depth.it-IT.md | 2 +- docs/02.1-jsx-in-depth.ja-JP.md | 2 +- docs/02.1-jsx-in-depth.ko-KR.md | 2 +- docs/02.1-jsx-in-depth.md | 2 +- docs/02.1-jsx-in-depth.zh-CN.md | 2 +- docs/02.2-jsx-spread.it-IT.md | 2 +- docs/02.2-jsx-spread.ja-JP.md | 2 +- docs/02.2-jsx-spread.ko-KR.md | 2 +- docs/02.2-jsx-spread.md | 2 +- docs/02.2-jsx-spread.zh-CN.md | 2 +- docs/02.3-jsx-gotchas.it-IT.md | 2 +- docs/02.3-jsx-gotchas.ja-JP.md | 2 +- docs/02.3-jsx-gotchas.ko-KR.md | 2 +- docs/02.3-jsx-gotchas.md | 2 +- docs/02.3-jsx-gotchas.zh-CN.md | 2 +- .../03-interactivity-and-dynamic-uis.it-IT.md | 2 +- .../03-interactivity-and-dynamic-uis.ja-JP.md | 2 +- .../03-interactivity-and-dynamic-uis.ko-KR.md | 2 +- docs/03-interactivity-and-dynamic-uis.md | 2 +- .../03-interactivity-and-dynamic-uis.zh-CN.md | 2 +- docs/04-multiple-components.it-IT.md | 2 +- docs/04-multiple-components.ja-JP.md | 2 +- docs/04-multiple-components.ko-KR.md | 2 +- docs/04-multiple-components.md | 2 +- docs/04-multiple-components.zh-CN.md | 2 +- docs/05-reusable-components.it-IT.md | 2 +- docs/05-reusable-components.ja-JP.md | 2 +- docs/05-reusable-components.ko-KR.md | 2 +- docs/05-reusable-components.md | 2 +- docs/05-reusable-components.zh-CN.md | 2 +- docs/06-transferring-props.it-IT.md | 2 +- docs/06-transferring-props.ja-JP.md | 2 +- docs/06-transferring-props.ko-KR.md | 2 +- docs/06-transferring-props.md | 2 +- docs/06-transferring-props.zh-CN.md | 2 +- docs/07-forms.it-IT.md | 2 +- docs/07-forms.ja-JP.md | 2 +- docs/07-forms.ko-KR.md | 2 +- docs/07-forms.md | 2 +- docs/07-forms.zh-CN.md | 2 +- docs/08-working-with-the-browser.it-IT.md | 2 +- docs/08-working-with-the-browser.ja-JP.md | 2 +- docs/08-working-with-the-browser.ko-KR.md | 2 +- docs/08-working-with-the-browser.md | 2 +- docs/08-working-with-the-browser.zh-CN.md | 2 +- docs/08.1-more-about-refs.it-IT.md | 2 +- docs/08.1-more-about-refs.ja-JP.md | 2 +- docs/08.1-more-about-refs.ko-KR.md | 2 +- docs/08.1-more-about-refs.md | 2 +- docs/08.1-more-about-refs.zh-CN.md | 2 +- docs/09-tooling-integration.it-IT.md | 2 +- docs/09-tooling-integration.ja-JP.md | 2 +- docs/09-tooling-integration.ko-KR.md | 2 +- docs/09-tooling-integration.md | 2 +- docs/09-tooling-integration.zh-CN.md | 2 +- docs/09.1-language-tooling.md | 2 +- docs/09.2-package-management.md | 2 +- docs/09.3-environments.md | 2 +- docs/10-addons.it-IT.md | 2 +- docs/10-addons.ja-JP.md | 2 +- docs/10-addons.ko-KR.md | 2 +- docs/10-addons.md | 2 +- docs/10-addons.zh-CN.md | 2 +- docs/10.1-animation.it-IT.md | 2 +- docs/10.1-animation.ja-JP.md | 2 +- docs/10.1-animation.ko-KR.md | 2 +- docs/10.1-animation.md | 2 +- docs/10.1-animation.zh-CN.md | 2 +- docs/10.10-shallow-compare.md | 2 +- docs/10.10-shallow-compare.zh-CN.md | 2 +- docs/10.2-form-input-binding-sugar.it-IT.md | 2 +- docs/10.2-form-input-binding-sugar.ja-JP.md | 2 +- docs/10.2-form-input-binding-sugar.ko-KR.md | 2 +- docs/10.2-form-input-binding-sugar.md | 2 +- docs/10.2-form-input-binding-sugar.zh-CN.md | 2 +- docs/10.3-class-name-manipulation.it-IT.md | 2 +- docs/10.3-class-name-manipulation.ja-JP.md | 2 +- docs/10.3-class-name-manipulation.ko-KR.md | 2 +- docs/10.3-class-name-manipulation.md | 2 +- docs/10.3-class-name-manipulation.zh-CN.md | 2 +- docs/10.4-test-utils.it-IT.md | 2 +- docs/10.4-test-utils.ja-JP.md | 2 +- docs/10.4-test-utils.ko-KR.md | 2 +- docs/10.4-test-utils.md | 2 +- docs/10.4-test-utils.zh-CN.md | 2 +- docs/10.5-clone-with-props.it-IT.md | 2 +- docs/10.5-clone-with-props.ja-JP.md | 2 +- docs/10.5-clone-with-props.ko-KR.md | 2 +- docs/10.5-clone-with-props.md | 2 +- docs/10.5-clone-with-props.zh-CN.md | 2 +- docs/10.6-create-fragment.it-IT.md | 2 +- docs/10.6-create-fragment.ja-JP.md | 2 +- docs/10.6-create-fragment.ko-KR.md | 2 +- docs/10.6-create-fragment.md | 2 +- docs/10.6-create-fragment.zh-CN.md | 2 +- docs/10.7-update.it-IT.md | 2 +- docs/10.7-update.ja-JP.md | 2 +- docs/10.7-update.ko-KR.md | 2 +- docs/10.7-update.md | 2 +- docs/10.7-update.zh-CN.md | 2 +- docs/10.8-pure-render-mixin.it-IT.md | 2 +- docs/10.8-pure-render-mixin.ja-JP.md | 2 +- docs/10.8-pure-render-mixin.ko-KR.md | 2 +- docs/10.8-pure-render-mixin.md | 2 +- docs/10.8-pure-render-mixin.zh-CN.md | 2 +- docs/10.9-perf.it-IT.md | 2 +- docs/10.9-perf.ja-JP.md | 2 +- docs/10.9-perf.ko-KR.md | 2 +- docs/10.9-perf.md | 2 +- docs/10.9-perf.zh-CN.md | 2 +- docs/11-advanced-performance.it-IT.md | 2 +- docs/11-advanced-performance.ja-JP.md | 2 +- docs/11-advanced-performance.ko-KR.md | 2 +- docs/11-advanced-performance.md | 2 +- docs/12-context.ko-KR.md | 2 +- docs/12-context.md | 2 +- docs/12-context.zh-CN.md | 2 +- docs/complementary-tools.it-IT.md | 2 +- docs/complementary-tools.ko-KR.md | 2 +- docs/complementary-tools.md | 2 +- docs/complementary-tools.zh-CN.md | 2 +- docs/conferences.it-IT.md | 2 +- docs/conferences.ko-KR.md | 2 +- docs/conferences.md | 2 +- docs/conferences.zh-CN.md | 2 +- docs/examples.it-IT.md | 2 +- docs/examples.ko-KR.md | 2 +- docs/examples.md | 2 +- docs/examples.zh-CN.md | 2 +- docs/flux-overview.it-IT.md | 2 +- docs/flux-overview.ko-KR.md | 2 +- docs/flux-overview.md | 2 +- docs/flux-overview.zh-CN.md | 2 +- docs/flux-todo-list.it-IT.md | 2 +- docs/flux-todo-list.ko-KR.md | 2 +- docs/flux-todo-list.md | 2 +- docs/flux-todo-list.zh-CN.md | 2 +- docs/getting-started.it-IT.md | 2 +- docs/getting-started.ja-JP.md | 2 +- docs/getting-started.ko-KR.md | 2 +- docs/getting-started.zh-CN.md | 2 +- docs/ref-01-top-level-api.it-IT.md | 2 +- docs/ref-01-top-level-api.ja-JP.md | 2 +- docs/ref-01-top-level-api.ko-KR.md | 2 +- docs/ref-01-top-level-api.md | 2 +- docs/ref-01-top-level-api.zh-CN.md | 2 +- docs/ref-02-component-api.it-IT.md | 2 +- docs/ref-02-component-api.ko-KR.md | 2 +- docs/ref-02-component-api.md | 2 +- docs/ref-02-component-api.zh-CN.md | 2 +- docs/ref-03-component-specs.it-IT.md | 2 +- docs/ref-03-component-specs.ko-KR.md | 2 +- docs/ref-03-component-specs.md | 2 +- docs/ref-03-component-specs.zh-CN.md | 2 +- docs/ref-04-tags-and-attributes.it-IT.md | 2 +- docs/ref-04-tags-and-attributes.ko-KR.md | 2 +- docs/ref-04-tags-and-attributes.md | 2 +- docs/ref-04-tags-and-attributes.zh-CN.md | 2 +- docs/ref-05-events.it-IT.md | 2 +- docs/ref-05-events.ko-KR.md | 2 +- docs/ref-05-events.md | 2 +- docs/ref-05-events.zh-CN.md | 2 +- docs/ref-06-dom-differences.it-IT.md | 2 +- docs/ref-06-dom-differences.ko-KR.md | 2 +- docs/ref-06-dom-differences.md | 2 +- docs/ref-06-dom-differences.zh-CN.md | 2 +- ...ref-07-special-non-dom-attributes.it-IT.md | 2 +- ...ref-07-special-non-dom-attributes.ko-KR.md | 2 +- docs/ref-07-special-non-dom-attributes.md | 2 +- ...ref-07-special-non-dom-attributes.zh-CN.md | 2 +- docs/ref-08-reconciliation.it-IT.md | 2 +- docs/ref-08-reconciliation.ko-KR.md | 2 +- docs/ref-08-reconciliation.md | 2 +- docs/ref-09-webcomponents.md | 2 +- docs/ref-09-webcomponents.zh-CN.md | 2 +- docs/ref-10-glossary.it-IT.md | 2 +- docs/ref-10-glossary.ko-KR.md | 2 +- docs/ref-10-glossary.md | 2 +- docs/ref-10-glossary.zh-CN.md | 2 +- docs/thinking-in-react.ko-KR.md | 2 +- docs/tutorial.ja-JP.md | 2 +- docs/tutorial.ko-KR.md | 2 +- docs/videos.it-IT.md | 2 +- docs/videos.ko-KR.md | 2 +- docs/videos.md | 2 +- docs/videos.zh-CN.md | 2 +- tips/01-introduction.ja-JP.md | 2 +- tips/01-introduction.ko-KR.md | 2 +- tips/01-introduction.md | 2 +- tips/02-inline-styles.ko-KR.md | 2 +- tips/02-inline-styles.md | 2 +- tips/03-if-else-in-JSX.ko-KR.md | 2 +- tips/03-if-else-in-JSX.md | 2 +- tips/04-self-closing-tag.ja-JP.md | 2 +- tips/04-self-closing-tag.ko-KR.md | 2 +- tips/04-self-closing-tag.md | 2 +- ...-maximum-number-of-jsx-root-nodes.ko-KR.md | 2 +- tips/05-maximum-number-of-jsx-root-nodes.md | 2 +- tips/06-style-props-value-px.ko-KR.md | 2 +- tips/06-style-props-value-px.md | 2 +- tips/07-children-props-type.ko-KR.md | 2 +- tips/07-children-props-type.md | 2 +- tips/08-controlled-input-null-value.ko-KR.md | 2 +- tips/08-controlled-input-null-value.md | 2 +- ...rops-not-triggered-after-mounting.ko-KR.md | 2 +- ...ceiveProps-not-triggered-after-mounting.md | 2 +- ...n-getInitialState-as-anti-pattern.ko-KR.md | 2 +- ...rops-in-getInitialState-as-anti-pattern.md | 2 +- tips/11-dom-event-listeners.ko-KR.md | 2 +- tips/11-dom-event-listeners.md | 2 +- tips/12-initial-ajax.ko-KR.md | 2 +- tips/12-initial-ajax.md | 2 +- tips/13-false-in-jsx.ko-KR.md | 2 +- tips/13-false-in-jsx.md | 2 +- ...14-communicate-between-components.ko-KR.md | 2 +- tips/14-communicate-between-components.md | 2 +- tips/15-expose-component-functions.ko-KR.md | 2 +- tips/15-expose-component-functions.md | 2 +- tips/16-references-to-components.ko-KR.md | 2 +- tips/16-references-to-components.md | 2 +- tips/17-children-undefined.ko-KR.md | 2 +- tips/17-children-undefined.md | 2 +- ...18-use-react-with-other-libraries.ko-KR.md | 2 +- tips/18-use-react-with-other-libraries.md | 2 +- tips/19-dangerously-set-inner-html.ko-KR.md | 2 +- tips/19-dangerously-set-inner-html.md | 2 +- 242 files changed, 299 insertions(+), 305 deletions(-) diff --git a/Gemfile b/Gemfile index 4f4991e3b..f144584ef 100644 --- a/Gemfile +++ b/Gemfile @@ -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' @@ -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? \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 89a0f264a..e2d319117 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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 diff --git a/_config.yml b/_config.yml index a4bdbce13..2a46105aa 100644 --- a/_config.yml +++ b/_config.yml @@ -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: @@ -36,6 +35,7 @@ sass: sass_dir: _css gems: - jekyll-redirect-from +- jekyll-paginate react_version: 15.2.1 react_hashes: dev: g2900ZIpFKhyIsz+bnx4YDEfAISugYRU58ljeAgI8TZ0A0AkRLGUCN7OmjF16Cj+ diff --git a/_layouts/default.html b/_layouts/default.html index d42b8b157..82659d8f3 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -50,10 +50,10 @@ React