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 +4 -4
- data/README.md +2 -0
- data/gemfiles/jekyll_3.gemfile +1 -1
- data/lib/jekyll_pages_api/page.rb +5 -0
- data/lib/jekyll_pages_api/version.rb +1 -1
- data/spec/integration_spec.rb +5 -0
- data/spec/site/about.md +4 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c5221638d1bc7cff97071c86b554dc3ad450120
|
4
|
+
data.tar.gz: c2d34d4ff057760141282c13d4690e32b3e7fe93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/gemfiles/jekyll_3.gemfile
CHANGED
@@ -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
|
data/spec/integration_spec.rb
CHANGED
@@ -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.
|
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-
|
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.
|
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
|