From ac7c1d0cd64e32df42209e399f6ee6bf95aba434 Mon Sep 17 00:00:00 2001 From: David Silva Smith Date: Sun, 15 Feb 2015 16:32:40 -0500 Subject: [PATCH 1/7] How to access a specific item in the data folder It's common to want to access a specific item in the data folder. this should be documented. --- site/_docs/datafiles.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/site/_docs/datafiles.md b/site/_docs/datafiles.md index 7f54a279..5a5de195 100644 --- a/site/_docs/datafiles.md +++ b/site/_docs/datafiles.md @@ -114,3 +114,30 @@ The organizations can then be accessed via `site.data.orgs`, followed by the fil {% endraw %} {% endhighlight %} + +## Example: Accessing a specific author + +Pages and posts can also access a specific item. The example below shows how to access a specific item: + +'_data/peoplejekyll.yml': +{% highlight yaml %} +dave: + name: David Smith + link: /bitcoin-expert/ + 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] %} + + +{% endraw %} +{% endhighlight %} From f2696c1c4c666705d465950e680ffb91e3c9928a Mon Sep 17 00:00:00 2001 From: David Smith Date: Sun, 15 Feb 2015 17:10:50 -0500 Subject: [PATCH 2/7] removed personal link --- site/_docs/datafiles.md | 1 - 1 file changed, 1 deletion(-) diff --git a/site/_docs/datafiles.md b/site/_docs/datafiles.md index 5a5de195..f0820dd1 100644 --- a/site/_docs/datafiles.md +++ b/site/_docs/datafiles.md @@ -123,7 +123,6 @@ Pages and posts can also access a specific item. The example below shows how to {% highlight yaml %} dave: name: David Smith - link: /bitcoin-expert/ twitter: DavidSilvaSmith {% endhighlight %} From ae0b13b531d493e9d8da3d02289599e8c9caa12e Mon Sep 17 00:00:00 2001 From: David Smith Date: Sun, 15 Feb 2015 17:16:54 -0500 Subject: [PATCH 3/7] proofed changes --- site/_docs/datafiles.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/site/_docs/datafiles.md b/site/_docs/datafiles.md index f0820dd1..d602f96a 100644 --- a/site/_docs/datafiles.md +++ b/site/_docs/datafiles.md @@ -117,9 +117,9 @@ The organizations can then be accessed via `site.data.orgs`, followed by the fil ## Example: Accessing a specific author -Pages and posts can also access a specific item. The example below shows how to access a specific item: +Pages and posts can also access a specific data item. The example below shows how to access a specific item: -'_data/peoplejekyll.yml': +'_data/peoplejekyll.yml`: {% highlight yaml %} dave: name: David Smith @@ -136,7 +136,11 @@ author: dave --- {% assign author = site.data.people.[page.author] %} - + {% endraw %} {% endhighlight %} From a2bf106c475b77d0827d41e0d098a5b3ccca09c8 Mon Sep 17 00:00:00 2001 From: David Smith Date: Sun, 15 Feb 2015 17:19:31 -0500 Subject: [PATCH 4/7] forgot a tick around a codefile name --- site/_docs/datafiles.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/_docs/datafiles.md b/site/_docs/datafiles.md index d602f96a..8eaecc9b 100644 --- a/site/_docs/datafiles.md +++ b/site/_docs/datafiles.md @@ -119,7 +119,7 @@ The organizations can then be accessed via `site.data.orgs`, followed by the fil Pages and posts can also access a specific data item. The example below shows how to access a specific item: -'_data/peoplejekyll.yml`: +`_data/peoplejekyll.yml`: {% highlight yaml %} dave: name: David Smith From edb50b81a396026db8bd8264ac56b86158680fc7 Mon Sep 17 00:00:00 2001 From: David Smith Date: Sun, 15 Feb 2015 17:20:02 -0500 Subject: [PATCH 5/7] changed the codefile name --- site/_docs/datafiles.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/_docs/datafiles.md b/site/_docs/datafiles.md index 8eaecc9b..4fd6e7b2 100644 --- a/site/_docs/datafiles.md +++ b/site/_docs/datafiles.md @@ -119,7 +119,7 @@ The organizations can then be accessed via `site.data.orgs`, followed by the fil Pages and posts can also access a specific data item. The example below shows how to access a specific item: -`_data/peoplejekyll.yml`: +`_data/people.yml`: {% highlight yaml %} dave: name: David Smith From e9638fa6a2be45e4b5d460300fc230ecaffdc2a5 Mon Sep 17 00:00:00 2001 From: David Smith Date: Tue, 17 Feb 2015 00:12:54 -0500 Subject: [PATCH 6/7] updated lsi docs --- site/_docs/variables.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/_docs/variables.md b/site/_docs/variables.md index 628a9904..11ff633b 100644 --- a/site/_docs/variables.md +++ b/site/_docs/variables.md @@ -103,10 +103,10 @@ following is a reference of the available data.

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 jekyll command with the --lsi (latent semantic - indexing) option. + indexing) option. Also note Github pages does not support the lsi option when generating sites.

From 2f75ade1b7b5c6c40212a52c4b56e62d262737a1 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Fri, 10 Apr 2015 17:23:34 -0400 Subject: [PATCH 7/7] docs: remove extraneous period from datafiles example. --- site/_docs/datafiles.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/site/_docs/datafiles.md b/site/_docs/datafiles.md index 4fd6e7b2..b32e1162 100644 --- a/site/_docs/datafiles.md +++ b/site/_docs/datafiles.md @@ -135,11 +135,11 @@ title: sample post author: dave --- -{% assign author = site.data.people.[page.author] %} - {% endraw %}