From f7c9c409e2c1c00d182504be79aadaa43943a382 Mon Sep 17 00:00:00 2001 From: Kevin Lacker Date: Mon, 3 Oct 2016 14:40:54 -0700 Subject: [PATCH 01/92] Community tab (#7854) Moving both "Community Resources" and "Support" into one tab called "Community" * community tab exists * make a community tab * fix next link * move urls to /community/ * refactor sidebars to be a bit more DRY * fix names of files * make the highlighty thing work * move files to logical names * also move translations --- docs/README.md | 2 +- docs/_config.yml | 6 ++++ docs/_data/nav_community.yml | 14 +++++++++ docs/_data/nav_docs.yml | 12 -------- docs/_includes/nav_community.html | 24 +++++++++++++++ docs/_includes/nav_docs.html | 4 +-- docs/_layouts/community.html | 29 +++++++++++++++++++ docs/_layouts/default.html | 2 +- docs/_plugins/sidebar_item.rb | 13 +++++++-- .../complementary-tools.it-IT.md | 0 .../complementary-tools.ko-KR.md | 0 .../complementary-tools.md | 0 .../complementary-tools.zh-CN.md | 0 docs/{docs => community}/conferences.it-IT.md | 0 docs/{docs => community}/conferences.ko-KR.md | 0 docs/{docs => community}/conferences.md | 7 +++-- docs/{docs => community}/conferences.zh-CN.md | 0 docs/{docs => community}/examples.it-IT.md | 0 docs/{docs => community}/examples.ko-KR.md | 0 docs/{docs => community}/examples.md | 0 docs/{docs => community}/examples.zh-CN.md | 0 docs/{ => community}/support.md | 8 +++-- docs/{docs => community}/videos.it-IT.md | 0 docs/{docs => community}/videos.ko-KR.md | 0 docs/{docs => community}/videos.md | 7 +++-- docs/{docs => community}/videos.zh-CN.md | 0 docs/docs/thinking-in-react.md | 2 +- 27 files changed, 102 insertions(+), 28 deletions(-) create mode 100644 docs/_data/nav_community.yml create mode 100644 docs/_includes/nav_community.html create mode 100644 docs/_layouts/community.html rename docs/{docs => community}/complementary-tools.it-IT.md (100%) rename docs/{docs => community}/complementary-tools.ko-KR.md (100%) rename docs/{docs => community}/complementary-tools.md (100%) rename docs/{docs => community}/complementary-tools.zh-CN.md (100%) rename docs/{docs => community}/conferences.it-IT.md (100%) rename docs/{docs => community}/conferences.ko-KR.md (100%) rename docs/{docs => community}/conferences.md (94%) rename docs/{docs => community}/conferences.zh-CN.md (100%) rename docs/{docs => community}/examples.it-IT.md (100%) rename docs/{docs => community}/examples.ko-KR.md (100%) rename docs/{docs => community}/examples.md (100%) rename docs/{docs => community}/examples.zh-CN.md (100%) rename docs/{ => community}/support.md (91%) rename docs/{docs => community}/videos.it-IT.md (100%) rename docs/{docs => community}/videos.ko-KR.md (100%) rename docs/{docs => community}/videos.md (98%) rename docs/{docs => community}/videos.zh-CN.md (100%) diff --git a/docs/README.md b/docs/README.md index cd1eaa9be5d26..961f5a2b9bc97 100644 --- a/docs/README.md +++ b/docs/README.md @@ -35,7 +35,7 @@ $ cd react/docs $ bundle exec rake $ bundle exec rake fetch_remotes $ bundle exec jekyll serve -w -$ open http://localhost:4000/react/ +$ open http://localhost:4000/react/index.html ``` We use [SASS](http://sass-lang.com/) (with [Bourbon](http://bourbon.io/)) for our CSS, and we use JSX to transform some of our JS. diff --git a/docs/_config.yml b/docs/_config.yml index 53fa1d01e8343..c9bd4f9f20cc8 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -36,6 +36,12 @@ defaults: type: pages values: sectionid: docs +- scope: + path: community + type: pages + values: + layout: community + sectionid: community exclude: - Gemfile - Gemfile.lock diff --git a/docs/_data/nav_community.yml b/docs/_data/nav_community.yml new file mode 100644 index 0000000000000..3740d3af7e89b --- /dev/null +++ b/docs/_data/nav_community.yml @@ -0,0 +1,14 @@ +- title: Community Resources + items: + - id: support + title: Where To Get Support + - id: conferences + title: Conferences + - id: videos + title: Videos + - id: complementary-tools + title: Complementary Tools + href: https://github.com/facebook/react/wiki/Complementary-Tools + - id: examples + title: Examples + href: https://github.com/facebook/react/wiki/Examples diff --git a/docs/_data/nav_docs.yml b/docs/_data/nav_docs.yml index e8f6b69132b35..82a4692174cad 100644 --- a/docs/_data/nav_docs.yml +++ b/docs/_data/nav_docs.yml @@ -6,18 +6,6 @@ title: Tutorial - id: thinking-in-react title: Thinking in React -- title: Community Resources - items: - - id: conferences - title: Conferences - - id: videos - title: Videos - - id: complementary-tools - title: Complementary Tools - href: https://github.com/facebook/react/wiki/Complementary-Tools - - id: examples - title: Examples - href: https://github.com/facebook/react/wiki/Examples - title: Guides items: - id: why-react diff --git a/docs/_includes/nav_community.html b/docs/_includes/nav_community.html new file mode 100644 index 0000000000000..7b26b8df93e78 --- /dev/null +++ b/docs/_includes/nav_community.html @@ -0,0 +1,24 @@ + diff --git a/docs/_includes/nav_docs.html b/docs/_includes/nav_docs.html index 560170606d8d6..c0431a32c2836 100644 --- a/docs/_includes/nav_docs.html +++ b/docs/_includes/nav_docs.html @@ -6,12 +6,12 @@

{{ section.title }}