@samitouri / QOS-React-2 / commits / 55a8339781
Fork 0

The library for web and native user interfaces.

Improve blog setup

* All posts under blog/ * Index @ blog/index.html * Only show excerpt on index with "continue reading" link * Date, name formatting improvements (better for humans) It could probably still use some style tweaks but I feel better about it. Moving forward, we'll use the "excerpt" feature of Jekyll with the default separator, which is just 2 newlines. So the first paragraph will be special. Alternatively you can specify excerpt, but we'll want to fix the layout so that gets added in.

Paul O’Shannessy committed Jun 3, 2013 at 13:04 UTC 55a83397810b5a6c061788f3cf6e2cb08853374f
10 files changed +51 -25
docs/_config.yml
+1
@@ -12,3 +12,4 @@ exclude:
12 - README.md
13 - Rakefile
14 baseurl: /react
15 +permalink: /blog/:year/:month/:day/:title.html
docs/_css/react.scss
+6
@@ -505,6 +505,12 @@ p {
505 margin: 0 auto;
506 }
507
508 +/* Blog */
509 +
510 +.post-list-item + .post-list-item {
511 + margin-top: 60px;
512 +}
513 +
514 /* Code Mirror */
515
516 div.CodeMirror pre, div.CodeMirror-linenumber, code {
docs/_includes/blog_post.html
+1 -1
@@ -3,7 +3,7 @@
3
4 <div id="post">
5 {% if content != '' %}
6 - {{ content }}
6 + {{ page.excerpt }}
7 {% else %}
8 {{ page.content }}
9 {% endif %}
docs/_layouts/blog.html deleted
-14
@@ -1,14 +0,0 @@
1 ----
2 -layout: default
3 -sectionid: blog
4 ----
5 -
6 -<section class="content wrap documentationContent">
7 - {% include nav_blog.html %}
8 - <div class="inner-content">
9 - {% for page in site.posts %}
10 - {% include blog_post.html %}
11 - {% endfor %}
12 - </div>
13 -</section>
14 -
docs/_layouts/default.html
+1 -1
@@ -41,7 +41,7 @@
41 <li><a href="/react/docs/getting-started.html"{% if page.sectionid == 'docs' %} class="active"{% endif %}>docs</a></li>
42 <li><a href="/react/support.html"{% if page.id == 'support' %} class="active"{% endif %}>support</a></li>
43 <li><a href="/react/downloads.html"{% if page.id == 'downloads' %} class="active"{% endif %}>download</a></li>
44 - <li><a href="/react/blog.html"{% if page.sectionid == 'blog' %} class="active"{% endif %}>blog</a></li>
44 + <li><a href="/react/blog/"{% if page.sectionid == 'blog' %} class="active"{% endif %}>blog</a></li>
45 <li><a href="http://github.com/facebook/react">github</a>
46 </ul>
47 <!-- <iframe src="http://ghbtns.com/github&#45;btn.html?user=facebook&#38;repo=react.js&#38;type=fork"allowtransparency="true" frameborder="0" scrolling="0" width="62" height="20"></iframe> -->
docs/_layouts/post.html
+8 -1
@@ -6,6 +6,13 @@ sectionid: blog
6 <section class="content wrap documentationContent">
7 {% include nav_blog.html %}
8 <div class="inner-content">
9 - {% include blog_post.html %}
9 + <h1>{{ page.title }}</h1>
10 + <p class="meta">{{ page.date | date: "%B %e, %Y" }} by {{ page.author }}</p>
11 +
12 + <hr>
13 +
14 + <div class="post">
15 + {{ content }}
16 + </div>
17 </div>
18 </section>
docs/_posts/2013-06-02-jsfiddle-integration.md
+3 -2
@@ -1,10 +1,11 @@
1 ---
2 title: JSFiddle Integration
3 layout: post
4 -author: Vjeux
4 +author: Christopher Chedeau
5 ---
6
7 -[JSFiddle](http://jsfiddle.net) just announced support for React. This is an exciting news as it makes collaboration on snippets of code a lot easier. You can play around this **[base React JSFiddle](http://jsfiddle.net/vjeux/kb3gN/)**, fork it and share it! A [fiddle without JSX](http://jsfiddle.net/vjeux/VkebS/) is also available .
7 +[JSFiddle](http://jsfiddle.net) just announced support for React. This is an exciting news as it makes collaboration on snippets of code a lot easier. You can play around this **[base React JSFiddle](http://jsfiddle.net/vjeux/kb3gN/)**, fork it and share it! A [fiddle without JSX](http://jsfiddle.net/vjeux/VkebS/) is also available.
8 +
9
10 <blockquote class="twitter-tweet" align="center"><p>React (by Facebook) is now available on JSFiddle. <a href="http://t.co/wNQf9JPv5u" title="http://facebook.github.io/react/">facebook.github.io/react/</a></p>&mdash; JSFiddle (@jsfiddle) <a href="https://twitter.com/jsfiddle/status/341114115781177344">June 2, 2013</a></blockquote>
11 <script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
docs/_posts/2013-06-03-why-react.md
+3 -2
@@ -1,12 +1,13 @@
1 ---
2 -title: Why should you care about React?
2 +title: Why Should You Care About React?
3 layout: post
4 -author: petehunt
4 +author: Pete Hunt
5 ---
6
7 There are a lot of JavaScript MVC frameworks out there. Why did we
8 build React, and why would you want to use it?
9
10 +
11 ## React is not an MVC framework.
12
13 It's a library designed for building big UIs. The type where you have
docs/blog.md deleted
-4
@@ -1,4 +0,0 @@
1 ----
2 -title: Blog
3 -layout: blog
4 ----
docs/blog/index.html new
+28
@@ -0,0 +1,28 @@
1 +---
2 +title: Blog
3 +layout: default
4 +sectionid: blog
5 +---
6 +
7 +<section class="content wrap documentationContent">
8 + {% include nav_blog.html %}
9 + <div class="inner-content">
10 + {% for page in site.posts %}
11 + <div class="post-list-item">
12 + <h1><a href="/react{{ page.url }}">{{ page.title }}</a></h1>
13 + <p class="meta">{{ page.date | date: "%B %e, %Y" }} by {{ page.author }}</p>
14 +
15 + <hr>
16 +
17 + <div class="post">
18 + {{ page.excerpt }}
19 + {% if page.excerpt != page.content %}
20 + <p>
21 + <a href="/react{{ page.url }}">Continue Reading &rarr;</a>
22 + </p>
23 + {% endif %}
24 + </div>
25 + </div>
26 + {% endfor %}
27 + </div>
28 +</section>