jekyll-titles-from-headings 0.1.4 → 0.1.5

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: c849aa0f10966920aabad9d02543b1f7569493bb
4
- data.tar.gz: b2fec723be347da0f30e7c76641b3ed7441b5c4b
3
+ metadata.gz: 84b1cda340e7783f0500f07bf11623b19b416ffb
4
+ data.tar.gz: f6dfc3e35d9f73b9e6c2f54305277382f082205b
5
5
  SHA512:
6
- metadata.gz: 1c10879457fa0f28ee539a5ec39e0cbd72ded44b04ddc2d82e4b9140d334abb11c5c439617ef8d9c0894cadccd56ef283eba3f987f3f3d1aab95157bab58c20a
7
- data.tar.gz: ac01db845d542e7295825bbd997d697d1c4c418cedca200cb680e9507b9d90f35b4ea36f9b45c06cf6a5eb84f6951f3e87b54cf1fa4a34f0c9bc9cc6ab586362
6
+ metadata.gz: 8fcd40fa5b965ea1ff04572f493f47de8a67ba61b4096feb8ebecef6b0be01b7b968bbcf628b1c5806eeeec69aac508dfc19eca14651d7687cb7c13ba0ec2578
7
+ data.tar.gz: 689a0d575e1cfe1ffa95fea8d15a35112c7b79c205b394ef0e5bdaefbf5ea5b75893af44ee83e5703a1d7b76fb879aba541134ec58967eeff5bafb2b6ccc3175
data/README.md CHANGED
@@ -1,18 +1,20 @@
1
1
  # Jekyll Title from Headings
2
2
 
3
- *A Jekyll plugin to pull page the title from first Markdown heading when none is specified.*
3
+ *A Jekyll plugin to pull the page title from the first Markdown heading when none is specified.*
4
4
 
5
5
  [![Build Status](https://travis-ci.org/benbalter/jekyll-title-from-headings.svg?branch=master)](https://travis-ci.org/benbalter/jekyll-title-from-headings)
6
6
 
7
7
  ## What it does
8
8
 
9
- If you have a Jekyll page that doesn't have a title specified in the YAML front matter, but the first non-whitespace line in a Markdown H1, H2, H3, this plugin instructs Jekyll to use that first heading as the page's title.
9
+ If you have a Jekyll page that doesn't have a title specified in the YAML Front Matter, but the first non-whitespace line in the page is a Markdown H1 / H2 / H3, this plugin instructs Jekyll to use that first heading as the page's title.
10
10
 
11
11
  ## Why
12
12
 
13
- Because lots of plugins and templates rely on `page.title`, but if you're using something like [Jekyll Optional Front Matter](https://github.com/benbalter/jekyll-optional-front-matter), you'd have to add front matter, just to get the title, which you're already specifying in the document.
13
+ Because lots of plugins and templates rely on `page.title`.
14
14
 
15
- Additionally, this allows you to store the title semantically, in the document itself, so that it's readable both as Markdown and when rendered, while still having the title be machine readible for things like [Jekyll SEO Tag](https://github.com/benbalter/jekyll-seo-tag).
15
+ If you're using a plugin like [Jekyll Optional Front Matter](https://github.com/benbalter/jekyll-optional-front-matter), you'd have to add Front Matter, just to get the title, which you're already specifying in the document.
16
+
17
+ Additionally, this allows you to store the title semantically, in the document itself so that it's readable, both as Markdown and when rendered, as machine-readable for plugins like [Jekyll SEO Tag](https://github.com/benbalter/jekyll-seo-tag).
16
18
 
17
19
  ## Usage
18
20
 
@@ -41,6 +41,8 @@ module JekyllTitlesFromHeadings
41
41
  return document.data["title"] if title?(document)
42
42
  matches = document.content.match(TITLE_REGEX)
43
43
  matches[1] if matches
44
+ rescue ArgumentError => e
45
+ raise e unless e.to_s.start_with?("invalid byte sequence in UTF-8")
44
46
  end
45
47
  end
46
48
  end
@@ -1,3 +1,3 @@
1
1
  module JekyllTitlesFromHeadings
2
- VERSION = "0.1.4".freeze
2
+ VERSION = "0.1.5".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-titles-from-headings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Balter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-02 00:00:00.000000000 Z
11
+ date: 2017-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -64,7 +64,7 @@ files:
64
64
  - lib/jekyll-titles-from-headings.rb
65
65
  - lib/jekyll-titles-from-headings/generator.rb
66
66
  - lib/jekyll-titles-from-headings/version.rb
67
- homepage: https://github.com/benbalter/titles-from-headings
67
+ homepage: https://github.com/benbalter/jekyll-titles-from-headings
68
68
  licenses:
69
69
  - MIT
70
70
  metadata: {}
@@ -84,9 +84,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  version: '0'
85
85
  requirements: []
86
86
  rubyforge_project:
87
- rubygems_version: 2.5.2
87
+ rubygems_version: 2.6.11
88
88
  signing_key:
89
89
  specification_version: 4
90
- summary: A Jekyll plugin to pull page the title from fist Markdown heading when none
91
- is specified
90
+ summary: A Jekyll plugin to pull the page title from the first Markdown heading when
91
+ none is specified.
92
92
  test_files: []