jekyll-post-unslugify 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1a22be810abe628951471f1107a3ddbc2075f384
4
+ data.tar.gz: 259c34c447eac109a51001b65b89cd4ca8e9f80c
5
+ SHA512:
6
+ metadata.gz: 4c16d5a2fa00347b9a221db8d6c74cc61f501e493f4555226d74480cac835e62adec3595557a71fff91c155160aa5e7fdc03313adc659c6fb39e6881a04130fc
7
+ data.tar.gz: 824bba9ce7fa641535f042b214d4c15a5ad552d2dc5cefee95e0e8b41cdc31a459e2eecffde2bf3c25ec89687bec077b04b872cd96773337e892d780772c6758
data/.gitignore ADDED
@@ -0,0 +1,6 @@
1
+ *.gem
2
+ Gemfile.lock
3
+ spec/dest
4
+ .bundle
5
+ .jekyll-metadata
6
+ .DS_Store
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+ gemspec
3
+
4
+ if ENV["JEKYLL_VERSION"]
5
+ gem "jekyll", "~> #{ENV["JEKYLL_VERSION"]}"
6
+ end
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
20
+
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'jekyll/post-unslugify/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "jekyll-post-unslugify"
8
+ spec.version = Jekyll::PostUnslugify::VERSION
9
+ spec.summary = "Keep post title unslugified."
10
+ spec.description = "A plugin to keep post title unslugified in Jekyll 3.0 and above."
11
+ spec.authors = ["rebornix"]
12
+ spec.email = "penn.lv@gmail.com"
13
+ spec.files = Dir.glob("lib/**/*.rb")
14
+ spec.homepage = "https://github.com/rebornix/jekyll-post-unslugify"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0")
18
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_development_dependency "jekyll", [">= 3.0", "< 4.0"]
23
+ spec.add_development_dependency "rspec", "~> 3.0"
24
+ spec.add_development_dependency 'rake', '~> 0'
25
+ spec.add_development_dependency "bundler", "~> 1.6"
26
+ end
@@ -0,0 +1,5 @@
1
+ module Jekyll
2
+ module PostUnslugify
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,26 @@
1
+ module Jekyll
2
+ class Document
3
+ def url_placeholders
4
+ {
5
+ collection: collection.label,
6
+ path: cleaned_relative_path,
7
+ output_ext: output_ext,
8
+ name: Utils.slugify(basename_without_ext),
9
+ title: Utils.slugify(data['slug']) || Utils.slugify(basename_without_ext),
10
+ unslugified_title: data['slug'] || basename_without_ext,
11
+ year: date.strftime("%Y"),
12
+ month: date.strftime("%m"),
13
+ day: date.strftime("%d"),
14
+ hour: date.strftime("%H"),
15
+ minute: date.strftime("%M"),
16
+ second: date.strftime("%S"),
17
+ i_day: date.strftime("%-d"),
18
+ i_month: date.strftime("%-m"),
19
+ categories: (data['categories'] || []).map { |c| c.to_s.downcase }.uniq.join('/'),
20
+ short_month: date.strftime("%b"),
21
+ short_year: date.strftime("%y"),
22
+ y_day: date.strftime("%j"),
23
+ }
24
+ end
25
+ end
26
+ end
metadata ADDED
@@ -0,0 +1,111 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jekyll-post-unslugify
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - rebornix
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-11-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: jekyll
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '3.0'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '4.0'
23
+ type: :development
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '3.0'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '4.0'
33
+ - !ruby/object:Gem::Dependency
34
+ name: rspec
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '3.0'
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '3.0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: rake
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ - !ruby/object:Gem::Dependency
62
+ name: bundler
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '1.6'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '1.6'
75
+ description: A plugin to keep post title unslugified in Jekyll 3.0 and above.
76
+ email: penn.lv@gmail.com
77
+ executables: []
78
+ extensions: []
79
+ extra_rdoc_files: []
80
+ files:
81
+ - ".gitignore"
82
+ - Gemfile
83
+ - LICENSE
84
+ - jekyll-post-unslugify.gemspec
85
+ - lib/jekyll/post-unslugify.rb
86
+ - lib/jekyll/post-unslugify/version.rb
87
+ homepage: https://github.com/rebornix/jekyll-post-unslugify
88
+ licenses:
89
+ - MIT
90
+ metadata: {}
91
+ post_install_message:
92
+ rdoc_options: []
93
+ require_paths:
94
+ - lib
95
+ required_ruby_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ requirements: []
106
+ rubyforge_project:
107
+ rubygems_version: 2.4.6
108
+ signing_key:
109
+ specification_version: 4
110
+ summary: Keep post title unslugified.
111
+ test_files: []