Browse Source

Put nav data in "_data"

New in Jekyll 1.3 - http://jekyllrb.com/docs/datafiles/
main
Paul O’Shannessy 11 years ago
parent
commit
1910d7fc0b
  1. 87
      _config.yml
  2. 57
      _data/nav_docs.yml
  3. 28
      _data/nav_tips.yml
  4. 4
      _includes/nav_docs.html

87
_config.yml

@ -18,90 +18,3 @@ description: A JavaScript library for building user interfaces
relative_permalinks: true relative_permalinks: true
paginate: 5 paginate: 5
paginate_path: /blog/page:num/ paginate_path: /blog/page:num/
nav_docs_sections:
- title: Quick Start
items:
- id: getting-started
title: Getting Started
- id: tutorial
title: Tutorial
- title: Guides
items:
- id: why-react
title: Why React?
- id: displaying-data
title: Displaying Data
subitems:
- id: jsx-in-depth
title: JSX in Depth
- id: jsx-gotchas
title: JSX Gotchas
- id: interactivity-and-dynamic-uis
title: Interactivity and Dynamic UIs
- id: multiple-components
title: Multiple Components
- id: reusable-components
title: Reusable Components
- id: forms
title: Forms
- id: working-with-the-browser
title: Working With the Browser
subitems:
- id: more-about-refs
title: More About Refs
- id: tooling-integration
title: Tooling Integration
- id: addons
title: Add-Ons
subitems:
- id: animation
title: Animation
- id: two-way-binding-helpers
title: Two-Way Binding Helpers
- id: class-name-manipulation
title: Class Name Manipulation
- id: examples
title: Examples
- title: Reference
items:
- id: top-level-api
title: Top-Level API
- id: component-api
title: Component API
- id: component-specs
title: Component Specs and Lifecycle
- id: tags-and-attributes
title: Supported Tags and Attributes
- id: events
title: Event System
- id: dom-differences
title: DOM Differences
nav_tips:
- title: Tips
items:
- id: introduction
title: Introduction
- id: inline-styles
title: Inline Styles
- id: if-else-in-JSX
title: If-Else in JSX
- id: self-closing-tag
title: Self-Closing Tag
- id: maximum-number-of-jsx-root-nodes
title: Maximum Number of JSX Root Nodes
- id: style-props-value-px
title: Shorthand for Specifying Pixel Values in style props
- id: children-props-type
title: Type of the Children props
- id: controlled-input-null-value
title: Value of null for Controlled Input
- id: componentWillReceiveProps-not-triggered-after-mounting
title: componentWillReceiveProps Not Triggered After Mounting
- id: props-in-getInitialState-as-anti-pattern
title: Props in getInitialState Is an Anti-Pattern
- id: dom-event-listeners
title: DOM Event Listeners in a Component
- id: initial-ajax
title: Load Initial Data via AJAX
- id: false-in-jsx
title: False in JSX

57
_data/nav_docs.yml

@ -0,0 +1,57 @@
- title: Quick Start
items:
- id: getting-started
title: Getting Started
- id: tutorial
title: Tutorial
- title: Guides
items:
- id: why-react
title: Why React?
- id: displaying-data
title: Displaying Data
subitems:
- id: jsx-in-depth
title: JSX in Depth
- id: jsx-gotchas
title: JSX Gotchas
- id: interactivity-and-dynamic-uis
title: Interactivity and Dynamic UIs
- id: multiple-components
title: Multiple Components
- id: reusable-components
title: Reusable Components
- id: forms
title: Forms
- id: working-with-the-browser
title: Working With the Browser
subitems:
- id: more-about-refs
title: More About Refs
- id: tooling-integration
title: Tooling Integration
- id: addons
title: Add-Ons
subitems:
- id: animation
title: Animation
- id: two-way-binding-helpers
title: Two-Way Binding Helpers
- id: class-name-manipulation
title: Class Name Manipulation
- id: examples
title: Examples
- title: Reference
items:
- id: top-level-api
title: Top-Level API
- id: component-api
title: Component API
- id: component-specs
title: Component Specs and Lifecycle
- id: tags-and-attributes
title: Supported Tags and Attributes
- id: events
title: Event System
- id: dom-differences
title: DOM Differences

28
_data/nav_tips.yml

@ -0,0 +1,28 @@
- title: Tips
items:
- id: introduction
title: Introduction
- id: inline-styles
title: Inline Styles
- id: if-else-in-JSX
title: If-Else in JSX
- id: self-closing-tag
title: Self-Closing Tag
- id: maximum-number-of-jsx-root-nodes
title: Maximum Number of JSX Root Nodes
- id: style-props-value-px
title: Shorthand for Specifying Pixel Values in style props
- id: children-props-type
title: Type of the Children props
- id: controlled-input-null-value
title: Value of null for Controlled Input
- id: componentWillReceiveProps-not-triggered-after-mounting
title: componentWillReceiveProps Not Triggered After Mounting
- id: props-in-getInitialState-as-anti-pattern
title: Props in getInitialState Is an Anti-Pattern
- id: dom-event-listeners
title: DOM Event Listeners in a Component
- id: initial-ajax
title: Load Initial Data via AJAX
- id: false-in-jsx
title: False in JSX

4
_includes/nav_docs.html

@ -1,6 +1,6 @@
<div class="nav-docs"> <div class="nav-docs">
<!-- Docs Nav --> <!-- Docs Nav -->
{% for section in site.nav_docs_sections %} {% for section in site.data.nav_docs %}
<div class="nav-docs-section"> <div class="nav-docs-section">
<h3>{{ section.title }}</h3> <h3>{{ section.title }}</h3>
<ul> <ul>
@ -27,7 +27,7 @@
{% endfor %} {% endfor %}
<!-- Tips Nav --> <!-- Tips Nav -->
{% for section in site.nav_tips %} {% for section in site.data.nav_tips %}
<div class="nav-docs-section"> <div class="nav-docs-section">
<h3>{{ section.title }}</h3> <h3>{{ section.title }}</h3>
<ul> <ul>

Loading…
Cancel
Save