Skip to content

Commit 4a0a14d

Browse files
committed
Put nav data in "_data"
New in Jekyll 1.3 - http://jekyllrb.com/docs/datafiles/
1 parent a55d44e commit 4a0a14d

File tree

4 files changed

+87
-89
lines changed

4 files changed

+87
-89
lines changed

docs/_config.yml

Lines changed: 0 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -18,90 +18,3 @@ description: A JavaScript library for building user interfaces
1818
relative_permalinks: true
1919
paginate: 5
2020
paginate_path: /blog/page:num/
21-
nav_docs_sections:
22-
- title: Quick Start
23-
items:
24-
- id: getting-started
25-
title: Getting Started
26-
- id: tutorial
27-
title: Tutorial
28-
- title: Guides
29-
items:
30-
- id: why-react
31-
title: Why React?
32-
- id: displaying-data
33-
title: Displaying Data
34-
subitems:
35-
- id: jsx-in-depth
36-
title: JSX in Depth
37-
- id: jsx-gotchas
38-
title: JSX Gotchas
39-
- id: interactivity-and-dynamic-uis
40-
title: Interactivity and Dynamic UIs
41-
- id: multiple-components
42-
title: Multiple Components
43-
- id: reusable-components
44-
title: Reusable Components
45-
- id: forms
46-
title: Forms
47-
- id: working-with-the-browser
48-
title: Working With the Browser
49-
subitems:
50-
- id: more-about-refs
51-
title: More About Refs
52-
- id: tooling-integration
53-
title: Tooling Integration
54-
- id: addons
55-
title: Add-Ons
56-
subitems:
57-
- id: animation
58-
title: Animation
59-
- id: two-way-binding-helpers
60-
title: Two-Way Binding Helpers
61-
- id: class-name-manipulation
62-
title: Class Name Manipulation
63-
- id: examples
64-
title: Examples
65-
- title: Reference
66-
items:
67-
- id: top-level-api
68-
title: Top-Level API
69-
- id: component-api
70-
title: Component API
71-
- id: component-specs
72-
title: Component Specs and Lifecycle
73-
- id: tags-and-attributes
74-
title: Supported Tags and Attributes
75-
- id: events
76-
title: Event System
77-
- id: dom-differences
78-
title: DOM Differences
79-
nav_tips:
80-
- title: Tips
81-
items:
82-
- id: introduction
83-
title: Introduction
84-
- id: inline-styles
85-
title: Inline Styles
86-
- id: if-else-in-JSX
87-
title: If-Else in JSX
88-
- id: self-closing-tag
89-
title: Self-Closing Tag
90-
- id: maximum-number-of-jsx-root-nodes
91-
title: Maximum Number of JSX Root Nodes
92-
- id: style-props-value-px
93-
title: Shorthand for Specifying Pixel Values in style props
94-
- id: children-props-type
95-
title: Type of the Children props
96-
- id: controlled-input-null-value
97-
title: Value of null for Controlled Input
98-
- id: componentWillReceiveProps-not-triggered-after-mounting
99-
title: componentWillReceiveProps Not Triggered After Mounting
100-
- id: props-in-getInitialState-as-anti-pattern
101-
title: Props in getInitialState Is an Anti-Pattern
102-
- id: dom-event-listeners
103-
title: DOM Event Listeners in a Component
104-
- id: initial-ajax
105-
title: Load Initial Data via AJAX
106-
- id: false-in-jsx
107-
title: False in JSX

docs/_data/nav_docs.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
- title: Quick Start
2+
items:
3+
- id: getting-started
4+
title: Getting Started
5+
- id: tutorial
6+
title: Tutorial
7+
- title: Guides
8+
items:
9+
- id: why-react
10+
title: Why React?
11+
- id: displaying-data
12+
title: Displaying Data
13+
subitems:
14+
- id: jsx-in-depth
15+
title: JSX in Depth
16+
- id: jsx-gotchas
17+
title: JSX Gotchas
18+
- id: interactivity-and-dynamic-uis
19+
title: Interactivity and Dynamic UIs
20+
- id: multiple-components
21+
title: Multiple Components
22+
- id: reusable-components
23+
title: Reusable Components
24+
- id: forms
25+
title: Forms
26+
- id: working-with-the-browser
27+
title: Working With the Browser
28+
subitems:
29+
- id: more-about-refs
30+
title: More About Refs
31+
- id: tooling-integration
32+
title: Tooling Integration
33+
- id: addons
34+
title: Add-Ons
35+
subitems:
36+
- id: animation
37+
title: Animation
38+
- id: two-way-binding-helpers
39+
title: Two-Way Binding Helpers
40+
- id: class-name-manipulation
41+
title: Class Name Manipulation
42+
- id: examples
43+
title: Examples
44+
- title: Reference
45+
items:
46+
- id: top-level-api
47+
title: Top-Level API
48+
- id: component-api
49+
title: Component API
50+
- id: component-specs
51+
title: Component Specs and Lifecycle
52+
- id: tags-and-attributes
53+
title: Supported Tags and Attributes
54+
- id: events
55+
title: Event System
56+
- id: dom-differences
57+
title: DOM Differences

docs/_data/nav_tips.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
- title: Tips
2+
items:
3+
- id: introduction
4+
title: Introduction
5+
- id: inline-styles
6+
title: Inline Styles
7+
- id: if-else-in-JSX
8+
title: If-Else in JSX
9+
- id: self-closing-tag
10+
title: Self-Closing Tag
11+
- id: maximum-number-of-jsx-root-nodes
12+
title: Maximum Number of JSX Root Nodes
13+
- id: style-props-value-px
14+
title: Shorthand for Specifying Pixel Values in style props
15+
- id: children-props-type
16+
title: Type of the Children props
17+
- id: controlled-input-null-value
18+
title: Value of null for Controlled Input
19+
- id: componentWillReceiveProps-not-triggered-after-mounting
20+
title: componentWillReceiveProps Not Triggered After Mounting
21+
- id: props-in-getInitialState-as-anti-pattern
22+
title: Props in getInitialState Is an Anti-Pattern
23+
- id: dom-event-listeners
24+
title: DOM Event Listeners in a Component
25+
- id: initial-ajax
26+
title: Load Initial Data via AJAX
27+
- id: false-in-jsx
28+
title: False in JSX

docs/_includes/nav_docs.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="nav-docs">
22
<!-- Docs Nav -->
3-
{% for section in site.nav_docs_sections %}
3+
{% for section in site.data.nav_docs %}
44
<div class="nav-docs-section">
55
<h3>{{ section.title }}</h3>
66
<ul>
@@ -27,7 +27,7 @@ <h3>{{ section.title }}</h3>
2727
{% endfor %}
2828

2929
<!-- Tips Nav -->
30-
{% for section in site.nav_tips %}
30+
{% for section in site.data.nav_tips %}
3131
<div class="nav-docs-section">
3232
<h3>{{ section.title }}</h3>
3333
<ul>

0 commit comments

Comments
 (0)