require 'jekyll/academicons/svg/academicons-icon' module Jekyll module Academicons module Svg class AcademiconsSvgGenerator < Liquid::Tag def render(context) output = nil unless context.environments.first['page']['academicons_svg'].nil? output = ' { "fontFamily": "Academicons", "majorVersion": 1, "minorVersion": 8, "fontURL": "https://jpswalsh.github.io/academicons/", "description": "Font generated by IcoMoon.", "designer": "James Walsh and Katja Bercic", "designerURL": "http://jpswalsh.com", "license": "SIL OFL 1.1", "licenseURL": "http://scripts.sil.org/OFL", "version": "Version 1.8", "fontId": "Academicons", "psName": "Academicons", "subFamily": "Regular", "fullName": "Academicons" } ' context.environments.first['page']['academicons_svg'].uniq.each do |icon| icon = AcademiconsIcon.new(icon) output += icon.to_svg_html end output += ' ' end unless output.nil? output end end end end end end