Sha256: 7f97f8400fdb2e8fddcfbcff52c0be483bafcd61a97890bc8a583dc7b5339790

Contents?: true

Size: 581 Bytes

Versions: 4

Compression:

Stored size: 581 Bytes

Contents

module Jekyll
   module Tags
      class RenderPhoneticTag < Liquid::Tag

         def initialize(tag_name, text, tokens)
            super
            @text = text
         end

         def render(context)
            "<abbr class=\"gloss\" title=\"International Phonetic Alphabet\">IPA</abbr>: <span class=\"ipa\">#{@text}</span>"
         end

      end
   end
end

# The register_tag method takes two arguments: the user-facing name of the tag [lang], and the class that implements it [DefineLanguageTag].
Liquid::Template.register_tag("ipa", Jekyll::Tags::RenderPhoneticTag)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
jekyll-theme-paperwiki-0.1.3 _plugins/ipa.rb
jekyll-theme-paperwiki-0.1.2 _plugins/ipa.rb
jekyll-theme-paperwiki-0.1.1 _plugins/ipa.rb
jekyll-theme-paperwiki-0.1.0 _plugins/ipa.rb