Browse Source

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.
main
Paul O’Shannessy 12 years ago
parent
commit
a17548f63d
  1. 1
      _config.yml
  2. 6
      _css/react.scss
  3. 2
      _includes/blog_post.html
  4. 14
      _layouts/blog.html
  5. 2
      _layouts/default.html
  6. 9
      _layouts/post.html
  7. 5
      _posts/2013-06-02-jsfiddle-integration.md
  8. 5
      _posts/2013-06-03-why-react.md
  9. 4
      blog.md
  10. 28
      blog/index.html

1
_config.yml

@ -12,3 +12,4 @@ exclude:
- README.md
- Rakefile
baseurl: /react
permalink: /blog/:year/:month/:day/:title.html

6
_css/react.scss

@ -505,6 +505,12 @@ p {
margin: 0 auto;
}
/* Blog */
.post-list-item + .post-list-item {
margin-top: 60px;
}
/* Code Mirror */
div.CodeMirror pre, div.CodeMirror-linenumber, code {

2
_includes/blog_post.html

@ -3,7 +3,7 @@
<div id="post">
{% if content != '' %}
{{ content }}
{{ page.excerpt }}
{% else %}
{{ page.content }}
{% endif %}

14
_layouts/blog.html

@ -1,14 +0,0 @@
---
layout: default
sectionid: blog
---
<section class="content wrap documentationContent">
{% include nav_blog.html %}
<div class="inner-content">
{% for page in site.posts %}
{% include blog_post.html %}
{% endfor %}
</div>
</section>

2
_layouts/default.html

@ -41,7 +41,7 @@
<li><a href="/react/docs/getting-started.html"{% if page.sectionid == 'docs' %} class="active"{% endif %}>docs</a></li>
<li><a href="/react/support.html"{% if page.id == 'support' %} class="active"{% endif %}>support</a></li>
<li><a href="/react/downloads.html"{% if page.id == 'downloads' %} class="active"{% endif %}>download</a></li>
<li><a href="/react/blog.html"{% if page.sectionid == 'blog' %} class="active"{% endif %}>blog</a></li>
<li><a href="/react/blog/"{% if page.sectionid == 'blog' %} class="active"{% endif %}>blog</a></li>
<li><a href="http://github.com/facebook/react">github</a>
</ul>
<!-- <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> -->

9
_layouts/post.html

@ -6,6 +6,13 @@ sectionid: blog
<section class="content wrap documentationContent">
{% include nav_blog.html %}
<div class="inner-content">
{% include blog_post.html %}
<h1>{{ page.title }}</h1>
<p class="meta">{{ page.date | date: "%B %e, %Y" }} by {{ page.author }}</p>
<hr>
<div class="post">
{{ content }}
</div>
</div>
</section>

5
_posts/2013-06-02-jsfiddle-integration.md

@ -1,10 +1,11 @@
---
title: JSFiddle Integration
layout: post
author: Vjeux
author: Christopher Chedeau
---
[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 .
[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.
<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>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

5
_posts/2013-06-03-why-react.md

@ -1,12 +1,13 @@
---
title: Why should you care about React?
title: Why Should You Care About React?
layout: post
author: petehunt
author: Pete Hunt
---
There are a lot of JavaScript MVC frameworks out there. Why did we
build React, and why would you want to use it?
## React is not an MVC framework.
It's a library designed for building big UIs. The type where you have

4
blog.md

@ -1,4 +0,0 @@
---
title: Blog
layout: blog
---

28
blog/index.html

@ -0,0 +1,28 @@
---
title: Blog
layout: default
sectionid: blog
---
<section class="content wrap documentationContent">
{% include nav_blog.html %}
<div class="inner-content">
{% for page in site.posts %}
<div class="post-list-item">
<h1><a href="/react{{ page.url }}">{{ page.title }}</a></h1>
<p class="meta">{{ page.date | date: "%B %e, %Y" }} by {{ page.author }}</p>
<hr>
<div class="post">
{{ page.excerpt }}
{% if page.excerpt != page.content %}
<p>
<a href="/react{{ page.url }}">Continue Reading &rarr;</a>
</p>
{% endif %}
</div>
</div>
{% endfor %}
</div>
</section>
Loading…
Cancel
Save