jekyll_html_truncatewords 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: 19cd98177b7ba8c36be921e7316be12b92a5871a6ba8e244408a6b3f592a2b06
4
- data.tar.gz: beead4981228ceb21022eb8cb6957f466c346c88a7819860e63acf2f6f24418d
3
+ metadata.gz: 2b5da1dcff65764fbe9e2e0a051f8fff05871e38180984bc6de1f6d05ac1bdc5
4
+ data.tar.gz: 1e38cf3cee323d413d7c481098df04792e14e697a3046df864d6cef698bc3a90
5
5
  SHA512:
6
- metadata.gz: 955a40e67d833d6ba70e4657a646613171f5ffb3f4994a70d87b1af643d5f0f2e8edb2bf44536cc1a4fb7654a4900a4db4e5ec13065b53c59c0debfd3764a9ef
7
- data.tar.gz: 8e5e9c3d10e9a966ebd958cea1af3b9bf9df314032acb817667c832611de6409fe8395b9466f3f6e7ac196443c1d07391de915043fbc2836e569e92f6a8c19cb
6
+ metadata.gz: 1bad5b78e086de5c05dc1f69033046df3ca288f1be4b933a0de904ed9f5447bac0acbfee8812bfb34dd32dded882c06170d6519aa56877f8ba06a3a0b66622ef
7
+ data.tar.gz: f93d1b526c5ad192d9885d5818ce9ef5e037ec4137f4a5e0d927efd90dbcf22585d7538153af2ee3a84d6471565753e3047ff62cba525816a101fe684e385f21
@@ -0,0 +1,9 @@
1
+ # jekyll_html_truncatewords Changelog
2
+
3
+ ## v0.1.1
4
+
5
+ * Remove liquid-c as a runtime dependency. (liquid is sufficient.)
6
+
7
+ ## v0.1.0
8
+
9
+ * Initial release.
@@ -1,35 +1,34 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jekyll_html_truncatewords (0.1.0)
4
+ jekyll_html_truncatewords (0.1.1)
5
5
  liquid
6
- liquid-c
7
6
  nokogiri
8
7
 
9
8
  GEM
10
9
  remote: https://rubygems.org/
11
10
  specs:
12
11
  diff-lcs (1.4.4)
13
- liquid (4.0.3)
14
- liquid-c (4.0.0)
15
- liquid (>= 3.0.0)
16
- mini_portile2 (2.4.0)
17
- nokogiri (1.10.10)
18
- mini_portile2 (~> 2.4.0)
12
+ liquid (5.0.0)
13
+ mini_portile2 (2.5.0)
14
+ nokogiri (1.11.1)
15
+ mini_portile2 (~> 2.5.0)
16
+ racc (~> 1.4)
17
+ racc (1.5.2)
19
18
  rake (12.3.3)
20
19
  rspec (3.10.0)
21
20
  rspec-core (~> 3.10.0)
22
21
  rspec-expectations (~> 3.10.0)
23
22
  rspec-mocks (~> 3.10.0)
24
- rspec-core (3.10.0)
23
+ rspec-core (3.10.1)
25
24
  rspec-support (~> 3.10.0)
26
- rspec-expectations (3.10.0)
25
+ rspec-expectations (3.10.1)
27
26
  diff-lcs (>= 1.2.0, < 2.0)
28
27
  rspec-support (~> 3.10.0)
29
- rspec-mocks (3.10.0)
28
+ rspec-mocks (3.10.1)
30
29
  diff-lcs (>= 1.2.0, < 2.0)
31
30
  rspec-support (~> 3.10.0)
32
- rspec-support (3.10.0)
31
+ rspec-support (3.10.1)
33
32
 
34
33
  PLATFORMS
35
34
  ruby
data/README.md CHANGED
@@ -2,29 +2,27 @@
2
2
 
3
3
  **WIP:** This gem is not ready for production use yet.`
4
4
 
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/jekyll/html/truncatewords`. To experiment with that code, run `bin/console` for an interactive prompt.
6
-
7
- TODO: Delete this and the text above, and describe your gem
5
+ A Jekyll filter to truncate HTML to a specified number of words. The Liquid truncatewords filter can't operate on HTML because it isn't aware of tags. But Jekyll blog posts usually contain HTML, so this makes it difficult to, for example, use the first 50 words of a blog post as the preview. jekyll_html_truncatewords solves that problem. It works the same as truncatewords, but it is aware of HTML tags so it counts words correctly within HTML and won't break HTML.
8
6
 
9
7
  ## Installation
10
8
 
11
- Add this line to your application's Gemfile:
9
+ This is a Jekyll plugin, and can be installed using any of the [supported
10
+ methods](https://jekyllrb.com/docs/plugins/installation/).
11
+
12
+ We recommend simply adding the gem to the `:jekyll_plugins` group in your
13
+ `Gemfile`:
12
14
 
13
15
  ```ruby
14
- gem 'jekyll_html_truncatewords'
16
+ group :jekyll_plugins do
17
+ gem 'jekyll_html_truncatewords', '~> 0.1'
18
+ end
15
19
  ```
16
20
 
17
- And then execute:
18
-
19
- $ bundle install
20
-
21
- Or install it yourself as:
22
-
23
- $ gem install jekyll_html_truncatewords
24
-
25
21
  ## Usage
26
22
 
27
- TODO: Write usage instructions here
23
+ ```
24
+ {{ post.content | html_truncatewords: 50 }}
25
+ ```
28
26
 
29
27
  ## Development
30
28
 
@@ -34,7 +32,8 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
34
32
 
35
33
  ## Contributing
36
34
 
37
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/jekyll_html_truncatewords.
35
+ Bug reports and pull requests are welcome on GitHub at
36
+ https://github.com/mkasberg/jekyll_html_truncatewords.
38
37
 
39
38
 
40
39
  ## License
@@ -7,14 +7,14 @@ Gem::Specification.new do |spec|
7
7
  spec.email = ["mike@mikekasberg.com"]
8
8
 
9
9
  spec.summary = %q{A Jekyll filter to truncate HTML}
10
- spec.description = %q{The Liquid truncatewords filter can't operate on HTML because it isn't aware of tags. But Jekyll blog posts usually contain HTML, so this makes it difficult to, for example, use the first 50 words of a blog post as the preview. jekyll_html_truncatewords solves that problem. It works the same as truncatewords, but it is aware of HTML tags so it counts words correctly within HTML and won't break HTML.}
10
+ spec.description = %q{A Jekyll filter to truncate HTML to a specified number of words. The Liquid truncatewords filter can't operate on HTML because it isn't aware of tags. But Jekyll blog posts usually contain HTML, so this makes it difficult to, for example, use the first 50 words of a blog post as the preview. jekyll_html_truncatewords solves that problem. It works the same as truncatewords, but it is aware of HTML tags so it counts words correctly within HTML and won't break HTML.}
11
11
  spec.homepage = "https://github.com/mkasberg/jekyll_html_trunctewords"
12
12
  spec.license = "MIT"
13
13
  spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
14
14
 
15
15
  spec.metadata["homepage_uri"] = spec.homepage
16
- spec.metadata["source_code_uri"] = "https://github.com/mkasberg/jekyll_html_trunctewords"
17
- spec.metadata["changelog_uri"] = "https://www.mikekasberg.com" # TODO
16
+ spec.metadata["source_code_uri"] = spec.homepage
17
+ spec.metadata["changelog_uri"] = "https://github.com/mkasberg/jekyll_html_trunctewords/blob/master/CHANGELOG.md"
18
18
 
19
19
  # Specify which files should be added to the gem when it is released.
20
20
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -26,6 +26,5 @@ Gem::Specification.new do |spec|
26
26
  spec.require_paths = ["lib"]
27
27
 
28
28
  spec.add_runtime_dependency 'liquid'
29
- spec.add_runtime_dependency 'liquid-c'
30
29
  spec.add_runtime_dependency 'nokogiri'
31
30
  end
@@ -1,3 +1,3 @@
1
1
  module JekyllHtmlTruncatewords
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_html_truncatewords
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Kasberg
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-12 00:00:00.000000000 Z
11
+ date: 2021-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: liquid
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: liquid-c
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: nokogiri
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -52,9 +38,10 @@ dependencies:
52
38
  - - ">="
53
39
  - !ruby/object:Gem::Version
54
40
  version: '0'
55
- description: The Liquid truncatewords filter can't operate on HTML because it isn't
56
- aware of tags. But Jekyll blog posts usually contain HTML, so this makes it difficult
57
- to, for example, use the first 50 words of a blog post as the preview. jekyll_html_truncatewords
41
+ description: A Jekyll filter to truncate HTML to a specified number of words. The
42
+ Liquid truncatewords filter can't operate on HTML because it isn't aware of tags.
43
+ But Jekyll blog posts usually contain HTML, so this makes it difficult to, for example,
44
+ use the first 50 words of a blog post as the preview. jekyll_html_truncatewords
58
45
  solves that problem. It works the same as truncatewords, but it is aware of HTML
59
46
  tags so it counts words correctly within HTML and won't break HTML.
60
47
  email:
@@ -66,7 +53,7 @@ files:
66
53
  - ".github/workflows/test.yml"
67
54
  - ".gitignore"
68
55
  - ".rspec"
69
- - ".travis.yml"
56
+ - CHANGELOG.md
70
57
  - Gemfile
71
58
  - Gemfile.lock
72
59
  - LICENSE.txt
@@ -83,7 +70,7 @@ licenses:
83
70
  metadata:
84
71
  homepage_uri: https://github.com/mkasberg/jekyll_html_trunctewords
85
72
  source_code_uri: https://github.com/mkasberg/jekyll_html_trunctewords
86
- changelog_uri: https://www.mikekasberg.com
73
+ changelog_uri: https://github.com/mkasberg/jekyll_html_trunctewords/blob/master/CHANGELOG.md
87
74
  post_install_message:
88
75
  rdoc_options: []
89
76
  require_paths:
@@ -1,6 +0,0 @@
1
- ---
2
- language: ruby
3
- cache: bundler
4
- rvm:
5
- - 2.7.1
6
- before_install: gem install bundler -v 2.1.4