jekyll-ipa 0.1.0

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
+ SHA256:
3
+ metadata.gz: b901e41698780e58c2c89e72061b4736073ea6b3cbaeacce791b7e953df052fc
4
+ data.tar.gz: d718d2a3b36bde1f124967347e42a7e4273a232ccabba62659ac9ca7919667c8
5
+ SHA512:
6
+ metadata.gz: 598c9107f9e6f85d603e4b876390c3e9abe0f962d79d02d10ffab098ddeaa6063b09cc9cfe2cfa46f6e198c26258870a395728777697704bc0d38682c4e4905d
7
+ data.tar.gz: a7c0ca86b635351fd55315188092a14812796a12bc2a846a50eb5a4a321deaa49f213482278b8853cf10635e8319e13a9f64b8886c7f896505e1a6afb61f6b36
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in jekyll-ipa.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 pomeloshark
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,48 @@
1
+ # Jekyll::Ipa
2
+
3
+ All this gem does is surround your International Phonetic Alphabet text with the following:
4
+
5
+ ```html
6
+ <abbr title="International Phonetic Alphabet">IPA</abbr>: <span class="ipa">[your input here]</span>
7
+ ```
8
+
9
+ and give it a little bit of styling to offset it from the surrounding text. This plugin is meant for use with the PaperWiki Jekyll theme.
10
+
11
+ ## Installation
12
+
13
+ Add this line to your application's Gemfile:
14
+
15
+ ```ruby
16
+ gem 'jekyll-ipa'
17
+ ```
18
+
19
+ And then execute:
20
+
21
+ $ bundle install
22
+
23
+ Or install it yourself as:
24
+
25
+ $ gem install jekyll-ipa
26
+
27
+ ## Usage
28
+
29
+ ```
30
+ {% ipa [phonetic transcription here] %}
31
+ {% ipa /phonemic transcription here/ %}
32
+ ```
33
+
34
+ It is not necessary to surround the transcription in quotes.
35
+
36
+ ## Development
37
+
38
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
39
+
40
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
41
+
42
+ ## Contributing
43
+
44
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/jekyll-ipa.
45
+
46
+ ## License
47
+
48
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ task default: %i[]
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "jekyll/ipa"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Jekyll
4
+ module Ipa
5
+ VERSION = "0.1.0"
6
+ end
7
+ end
data/lib/jekyll/ipa.rb ADDED
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "ipa/version"
4
+
5
+ module Jekyll
6
+ module Tags
7
+ class RenderPhoneticTag < Liquid::Tag
8
+
9
+ # initialize is called when we encounter the {% ipa %} Liquid tag; 'ipa' is the tag name and anything immediately after it is passed in via the second argument
10
+ def initialize(tag_name, text, tokens)
11
+ super
12
+ @text = text
13
+ end
14
+
15
+ def render(context)
16
+ "<abbr class=\"gloss\" title=\"International Phonetic Alphabet\">IPA</abbr>: <span class=\"ipa\">#{@text}</span>"
17
+ end
18
+
19
+ end
20
+ end
21
+ end
22
+
23
+ # The register_tag method takes two arguments: the user-facing name of the tag [ipa], and the class that implements it [RenderPhoneticTag].
24
+ Liquid::Template.register_tag("ipa", Jekyll::Tags::RenderPhoneticTag)
@@ -0,0 +1,6 @@
1
+ module Jekyll
2
+ module Ipa
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,54 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jekyll-ipa
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - pomeloshark
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-01-07 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email:
15
+ - 121037935+pomeloshark@users.noreply.github.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - Gemfile
21
+ - LICENSE.txt
22
+ - README.md
23
+ - Rakefile
24
+ - bin/console
25
+ - bin/setup
26
+ - lib/jekyll/ipa.rb
27
+ - lib/jekyll/ipa/version.rb
28
+ - sig/jekyll/ipa.rbs
29
+ homepage: https://github.com/pomeloshark/jekyll-ipa
30
+ licenses:
31
+ - MIT
32
+ metadata:
33
+ homepage_uri: https://github.com/pomeloshark/jekyll-ipa
34
+ source_code_uri: https://github.com/pomeloshark/jekyll-ipa
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.1.2
51
+ signing_key:
52
+ specification_version: 4
53
+ summary: IPA plugin to go with the Jekyll PaperWiki theme.
54
+ test_files: []