class Jekyll::Tags::WorkflowTag

The (unused?) workflow rendering tag.

Public Class Methods

Calls superclass method
# File _plugins/jekyll-tool-tag.rb, line 75
def initialize(tag_name, text, tokens)
  super
  @text = text.strip
end

Public Instance Methods

Call the tag. It MUST be this format: {% workflow [Main Workflow](topics/x/tutorials/y/material/workflows/main.ga) %}

# File _plugins/jekyll-tool-tag.rb, line 83
def render(_context)
  format = /\[(?<title>.*)\]\((?<url>.*)\)/
  m = @text.match(format)
  # puts "Found #{@text} => #{m[:title]}, #{m[:url]}"

  "<span class=\"workflow\" data-workflow=\"#{m[:url]}\"><strong>#{m[:title]}</strong> " \
    '<i class="fas fa-share-alt" aria-hidden="true"></i></span>'
end