Add docs for new Data Files feature #1503

Merged
merged 3 commits into from Oct 3, 2013

Projects

None yet

5 participants

@swanson
Contributor
swanson commented Sep 4, 2013

Add documentation for the new Data Files feature introduced in #1003.

The original PR includes additions to /structure/ so they have been omitted here.

@parkr parkr commented on an outdated diff Sep 4, 2013
site/docs/data.md
+
+{% highlight yaml %}
+- name: Tom Preston-Werner
+ github: mojombo
+
+- name: Parker Moore
+ github: parkr
+
+- name: Liu Fengyun
+ github: liufengyun
+{% endhighlight %}
+
+This data can be accessed via `site.data.members` (notice that the filename
+determines the variable name).
+
+You can now do render the list of members in a template:
@parkr
parkr Sep 4, 2013 Member

Is the do meant to be there?

@parkr parkr commented on an outdated diff Sep 4, 2013
site/docs/data.md
+{% endhighlight %}
+
+This data can be accessed via `site.data.members` (notice that the filename
+determines the variable name).
+
+You can now do render the list of members in a template:
+
+{% highlight html %}
+<ul>
+{% raw %}{% for member in site.data.members %}{% endraw %}
+ <li>
+ <a href="https://github.com/{% raw %}{{ member.github }}{% endraw %}">
+ {% raw %}{{ member.name }}{% endraw %}
+ </a>
+ </li>
+{% raw %}{% end %}{% endraw %}
@parkr
parkr Sep 4, 2013 Member

This block you can be encompassed entirely by {% raw %} tags. No need to specify raw tags for each liquid statement within, as they all must be raw.

@parkr parkr and 1 other commented on an outdated diff Sep 4, 2013
site/docs/data.md
@@ -0,0 +1,61 @@
+---
+layout: docs
+title: Data Files
+prev_section: variables
+next_section: migrations
@parkr
parkr Sep 4, 2013 Member

Migrations will have to be updated, no?

@swanson
swanson Sep 5, 2013 Contributor

Yes, good catch. Fixed.

@parkr
Member
parkr commented Sep 4, 2013

This looks great!! Thanks for putting this together.

@liufengyun
Contributor

Thanks @swanson .

It seems the test features/site_data.feature:35 is a little unstable. The travis CI failed.

https://travis-ci.org/mojombo/jekyll/builds/10989828

@swanson
Contributor
swanson commented Sep 5, 2013

Corrections made.

@parkr
Member
parkr commented Sep 5, 2013

LGTM!

@mattr-
Member
mattr- commented Sep 10, 2013

LGTM to me too!

@swanson
Contributor
swanson commented Oct 1, 2013

@mattr- @parkr can we merge this now that #1003 is in?

@mattr-
Member
mattr- commented Oct 1, 2013

We can. Could you rebase it so it's current with latest master and I can just hit the big green button? Thanks!

@swanson
Contributor
swanson commented Oct 1, 2013

@mattr- should be good to go once Travis runs. Might give it a quick once over, somewhere upstream the menu items were moved to an includes, so this wasn't strictly a rebase (as there was a merge conflict that needed to be addressed).

@parkr
Member
parkr commented Oct 1, 2013

@mattr- What happened to the tests?

@maul-esel
Contributor

@parkr: I think it's the MaRuKu release 0.7.0, because exactly the same failures already occured before in #1558.

@mattr- mattr- merged commit b723a58 into jekyll:master Oct 3, 2013

1 check failed

default The Travis CI build could not complete due to an error
Details
@mattr- mattr- added a commit that referenced this pull request Oct 3, 2013
@mattr- mattr- Update history to reflect merge of #1503 bc71dc8
@swanson swanson deleted the swanson:add-docs-for-data-feature branch Oct 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment