Clean some code and add documentation

This commit is contained in:
Saivann 2013-10-21 23:45:57 -04:00
parent 06685bbe13
commit 9b05a0bc8e
15 changed files with 208 additions and 140 deletions

View file

@ -1,6 +1,3 @@
require 'yaml'
require 'cgi'
#translate( id [,category ,lang] )
#Return translated string using translations files
@ -17,7 +14,11 @@ require 'cgi'
#/en/vocabulary#wallet when the page is in english or
#/fr/vocabulaire#porte-monnaie when the page is in french.
require 'yaml'
require 'cgi'
module Jekyll
class TranslateTag < Liquid::Tag
def initialize(tag_name, id, tokens)
@ -82,6 +83,7 @@ module Jekyll
text
end
end
end
Liquid::Template.register_tag('translate', Jekyll::TranslateTag)