Merge branch 'davidsilvasmith-origin/patch-3'

* davidsilvasmith-origin/patch-3:
  docs: remove extraneous period from datafiles example.
  updated lsi docs
  changed the codefile name
  forgot a tick around a codefile name
  proofed changes
  removed personal link
  How to access a specific item in the data folder
This commit is contained in:
Parker Moore 2015-04-10 17:23:43 -04:00
commit 66a9e6909b
2 changed files with 32 additions and 2 deletions

View File

@ -119,3 +119,33 @@ file name:
</ul>
{% endraw %}
{% endhighlight %}
## Example: Accessing a specific author
Pages and posts can also access a specific data item. The example below shows how to access a specific item:
`_data/people.yml`:
{% highlight yaml %}
dave:
name: David Smith
twitter: DavidSilvaSmith
{% endhighlight %}
The author can then be specified as a page variable in a post's frontmatter:
{% highlight html %}
{% raw %}
---
title: sample post
author: dave
---
{% assign author = site.data.people[page.author] %}
<a rel="author"
href="{{ author.twitter }}"
title="{{ author.name }}">
{{ author.name }}
</a>
{% endraw %}
{% endhighlight %}

View File

@ -103,10 +103,10 @@ following is a reference of the available data.
<td><p>
If the page being processed is a Post, this contains a list of up to ten
related Posts. By default, these are low quality but fast to compute.
related Posts. By default, these are the ten most recent posts.
For high quality but slow to compute results, run the
<code>jekyll</code> command with the <code>--lsi</code> (latent semantic
indexing) option.
indexing) option. Also note Github pages does not support the <code>lsi</code> option when generating sites.
</p></td>
</tr>