jekyll-nbsp 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: e92998eab366f27fa2342dc618b3df30bd36a7217f5cbc15488c3a6cd317cba0
4
+ data.tar.gz: 8447b6ec04d2ae49f0b7c41a9d638e85019c6d3e1b8b86430bd7e8e1b4bf4821
5
+ SHA512:
6
+ metadata.gz: ed11e385e173d49d27fed018e3b131a128aca6179ecd2fbf715af08980bbdc7d022d549b36d1146b6fda3392adbe52965416e874e2b79bb526e549bb9c74c826
7
+ data.tar.gz: eae62df624b8974e6c469ff51cee268121c31ac7087eea82fa74ab2f387dd5a1a6cdd056fc0c499050500eb78db22c59b7017ac5c34c05e371441e640d63c1bd
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 Jack Webb
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,20 @@
1
+ # Jekyll Non-breaking space filter (jekyll-nbsp)
2
+
3
+ A simple non-breaking space filter for Liquid/Jekyll. Replaces spaces with '\u00A0'.
4
+
5
+ ## Installation
6
+
7
+ 1. Add `gem 'jekyll-nbsp'` to your Gemfile
8
+ 2. Run `bundle install`
9
+ 3. Add it to your Jekyll `_config.yml` like so
10
+
11
+ ```yaml
12
+ plugins:
13
+ - jekyll-nbsp
14
+ ```
15
+
16
+
17
+ ## Usage
18
+ ```
19
+ {{ "This text has spaces" | nbsp }}
20
+ ```
data/Rakefile ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ task default: %i[]
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/jekyll-nbsp/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "jekyll-nbsp"
7
+ spec.version = Jekyll::Nbsp::VERSION
8
+ spec.authors = ["Jack Webb"]
9
+ spec.email = ["git@jackwebb.me"]
10
+
11
+ spec.summary = "Jekyll filter to make spaces between words non-breaking. Use {{ page.my_text | nbsp }} in your Liquid template."
12
+ spec.homepage = "https://github.com/jack-webb/jekyll-nbsp"
13
+ spec.license = "MIT"
14
+ spec.required_ruby_version = ">= 2.6.0"
15
+
16
+ spec.metadata["homepage_uri"] = spec.homepage
17
+ spec.metadata["source_code_uri"] = "https://github.com/jack-webb/jekyll-nbsp"
18
+ spec.metadata["changelog_uri"] = "https://github.com/jack-webb/jekyll-nbsp"
19
+
20
+ # Specify which files should be added to the gem when it is released.
21
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
+ spec.files = Dir.chdir(__dir__) do
23
+ `git ls-files -z`.split("\x0").reject do |f|
24
+ (File.expand_path(f) == __FILE__) ||
25
+ f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor Gemfile])
26
+ end
27
+ end
28
+ spec.bindir = "exe"
29
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ["lib"]
31
+
32
+ # Uncomment to register a new dependency of your gem
33
+ # spec.add_dependency "example-gem", "~> 1.0"
34
+
35
+ # For more information and examples about making a new gem, check out our
36
+ # guide at: https://bundler.io/guides/creating_gem.html
37
+ end
@@ -0,0 +1,9 @@
1
+ module Jekyll
2
+ module Nbsp
3
+ def nbsp(input)
4
+ input.to_s.gsub(' ', "\u00A0")
5
+ end
6
+ end
7
+ end
8
+
9
+ Liquid::Template.register_filter(Jekyll::Nbsp)
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Jekyll
4
+ module Nbsp
5
+ VERSION = "0.1.2"
6
+ end
7
+ end
@@ -0,0 +1 @@
1
+ require_relative "jekyll-nbsp/jekyll-nbsp"
@@ -0,0 +1,6 @@
1
+ module Jekyll
2
+ module Nbsp
3
+ VERSION: String
4
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
5
+ end
6
+ end
metadata ADDED
@@ -0,0 +1,55 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jekyll-nbsp
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.2
5
+ platform: ruby
6
+ authors:
7
+ - Jack Webb
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-08-04 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email:
15
+ - git@jackwebb.me
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - LICENSE.txt
21
+ - README.md
22
+ - Rakefile
23
+ - jekyll-nbsp.gemspec
24
+ - lib/jekyll-nbsp.rb
25
+ - lib/jekyll-nbsp/jekyll-nbsp.rb
26
+ - lib/jekyll-nbsp/version.rb
27
+ - sig/jekyll/nbsp.rbs
28
+ homepage: https://github.com/jack-webb/jekyll-nbsp
29
+ licenses:
30
+ - MIT
31
+ metadata:
32
+ homepage_uri: https://github.com/jack-webb/jekyll-nbsp
33
+ source_code_uri: https://github.com/jack-webb/jekyll-nbsp
34
+ changelog_uri: https://github.com/jack-webb/jekyll-nbsp
35
+ post_install_message:
36
+ rdoc_options: []
37
+ require_paths:
38
+ - lib
39
+ required_ruby_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 2.6.0
44
+ required_rubygems_version: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ requirements: []
50
+ rubygems_version: 3.4.10
51
+ signing_key:
52
+ specification_version: 4
53
+ summary: Jekyll filter to make spaces between words non-breaking. Use {{ page.my_text
54
+ | nbsp }} in your Liquid template.
55
+ test_files: []