diff --git a/themes/classic/_plugins/blockquote.rb b/themes/classic/_plugins/blockquote.rb index 7a88517..21ebc5d 100644 --- a/themes/classic/_plugins/blockquote.rb +++ b/themes/classic/_plugins/blockquote.rb @@ -1,7 +1,7 @@ # # Author: Josediaz Gonzalez - https://github.com/josegonzalez # Source URL: https://github.com/josegonzalez/josediazgonzalez.com/blob/master/_plugins/blockquote.rb -# Modified by Brandon Mathis +# Modified by Brandon Mathis removed pullquotes and added simple cite paramaters # require './_plugins/titlecase.rb' module Jekyll @@ -45,65 +45,14 @@ module Jekyll if @by.nil? '
' elsif !@title.nil? - '' + output.join + '
' + '' + output.join + '
' + @by + '' + '' + @title + '
' + '' elsif !@source.nil? - '' + output.join + '
' + '' + @by + '' + '' + @title + '
' + '' + output.join + '
' + @by + '' + 'source
' + '' else - '' + output.join + '
' + '' + @by + '' + 'source
' + '' + output.join + '
' + @by + '
' - end - end - end - - # Outputs a string with a given attribution as a pullquote - # - # {% blockquote John Paul Jones %} - # Monkeys! - # {% endblockquote %} - # ... - #- # Monkeys! - #- # - class Pullquote < Liquid::Block - FullCiteWithTitle = /([\w\s]+)(http:\/\/|https:\/\/)(\S+)([\w\s]+)/i - FullCite = /([\w\s]+)(http:\/\/|https:\/\/)(\S+)/i - Author = /([\w\s]+)/ - - def initialize(tag_name, markup, tokens) - @by = nil - @source = nil - @title = nil - if markup =~ FullCiteWithTitle - @by = $1 - @source = $2 + $3 - @title = $4 - elsif markup =~ FullCite - @by = $1 - @source = $2 + $3 - elsif markup =~ Author - @by = $1 - end - super - end - - def render(context) - output = super - if @by.nil? - '
- # John Paul Jones - #
' - elsif @title - '' + output.join + '
' + '' + output.join + '
' + @by + '' + ' ' + @title + '
' - elsif @source - '' + '' + output.join + '
' + @by + '' + ' source
' - elsif @by - '' + '' + output.join + '
' + @by + '
' + '' end end end end Liquid::Template.register_tag('blockquote', Jekyll::Blockquote) -Liquid::Template.register_tag('pullquote', Jekyll::Pullquote) - - diff --git a/themes/classic/_plugins/iterator.rb b/themes/classic/_plugins/iterator.rb deleted file mode 100644 index da0b5f0..0000000 --- a/themes/classic/_plugins/iterator.rb +++ /dev/null @@ -1,49 +0,0 @@ -## -## Author: Jose Gonzalez - https://github.com/josegonzalez -## Source URL: https://github.com/josegonzalez/josediazgonzalez.com/blob/master/_plugins/iterator.rb -## - -#module Jekyll - #class Site - #alias_method :orig_site_payload, :site_payload - - ## Constuct an array of hashes that will allow the user, using Liquid, to - ## iterate through the keys of _kv_hash_ and be able to iterate through the - ## elements under each key. - ## - ## Example: - ## categories = { 'Ruby' => [' + output.join + '
' + '' + @by + '