jekyll_pages_api 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 811fc43f57f4e801222cf78914842d6809c5b1d0
4
- data.tar.gz: 9dacb9aa3c7a60a1ecc07f6ab7b0f381003929e9
3
+ metadata.gz: 2c5221638d1bc7cff97071c86b554dc3ad450120
4
+ data.tar.gz: c2d34d4ff057760141282c13d4690e32b3e7fe93
5
5
  SHA512:
6
- metadata.gz: b7d6f06549f8ae61acef268bceadfc80b632ec1d6d63d5b3f1df4d20e04a6724745ccaf72eccf58cfa429d0b3eaa30949e0051100f71a97e3c244d67f7e108af
7
- data.tar.gz: af0004b3e2a43dedc840eb2d5c687d3355c914008cdf64f3b45cf49042b59e8f82422825431fd37b353fefd80287fb5ffa08f4586ad304f2a0cdc5d979eb6997
6
+ metadata.gz: 4dbd890b286d8610d5d52c47a3202ad827dd80f7cc3d806c649d0eaa77e2033a1910ab7dbb588ce53505e03985a67033ff492cd2747d7fdd4146c9121b1f9ed5
7
+ data.tar.gz: 2e7e3370cf5faa3dfdb00248c12b45871ed161fb2650deb7dae6322beba56e67d7569fec22bfa495a3d0f2399864066d2ba1be85e65856708b78ae0ce0ecccc4
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Jekyll Pages API [![Build Status](https://travis-ci.org/18F/jekyll_pages_api.svg?branch=master)](https://travis-ci.org/18F/jekyll_pages_api) [![Code Climate](https://codeclimate.com/github/18F/jekyll_pages_api/badges/gpa.svg)](https://codeclimate.com/github/18F/jekyll_pages_api)
2
2
 
3
+ [![Join the chat at https://gitter.im/18F/jekyll_pages_api](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/18F/jekyll_pages_api?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4
+
3
5
  Jekyll Pages API is a [Jekyll Plugin](http://jekyllrb.com/docs/plugins/) gem that generates a JSON file with data for all the Pages in your Site. [Jekyll](http://jekyllrb.com), if you're not familiar, is a static website generator written in Ruby.
4
6
 
5
7
  ## Usage
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'jekyll', '3.0.0.beta2'
3
+ gem 'jekyll', '3.0.0.pre.beta2'
4
4
 
5
5
  gemspec path: '../'
@@ -33,10 +33,15 @@ module JekyllPagesApi
33
33
  self.filterer.text_only(self.page.content)
34
34
  end
35
35
 
36
+ def tags
37
+ self.page.data['tags'] || []
38
+ end
39
+
36
40
  def to_json
37
41
  {
38
42
  title: self.title,
39
43
  url: self.url,
44
+ tags: self.tags,
40
45
  body: self.body_text
41
46
  }
42
47
  end
@@ -1,3 +1,3 @@
1
1
  module JekyllPagesApi
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
@@ -81,4 +81,9 @@ describe "integration" do
81
81
  page = page_data('/unicode.html')
82
82
  expect(page['body']).to eq("”Handle the curly quotes!” they said.")
83
83
  end
84
+
85
+ it "includes front matter tags" do
86
+ page = page_data('/about/')
87
+ expect(page['tags']).to eq(["Jekyll", "test page", "convenient"])
88
+ end
84
89
  end
data/spec/site/about.md CHANGED
@@ -2,6 +2,10 @@
2
2
  layout: page
3
3
  title: About
4
4
  permalink: /about/
5
+ tags:
6
+ - Jekyll
7
+ - test page
8
+ - convenient
5
9
  ---
6
10
 
7
11
  This is the base Jekyll theme. You can find out more info about customizing your Jekyll theme, as well as basic Jekyll usage documentation at [jekyllrb.com](http://jekyllrb.com/)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_pages_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aidan Feldman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-06 00:00:00.000000000 Z
11
+ date: 2015-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  version: '0'
155
155
  requirements: []
156
156
  rubyforge_project:
157
- rubygems_version: 2.4.6
157
+ rubygems_version: 2.4.5
158
158
  signing_key:
159
159
  specification_version: 4
160
160
  summary: A Jekyll Plugin that generates a JSON file with data for all the Pages in