From d4d5c9203670cc4ae3625cafdb1499fa18688bc2 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 30 Oct 2020 16:24:10 -0300 Subject: Translate alt of link icon --- _plugins/add-anchor-to-header-from-header-id.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '_plugins') diff --git a/_plugins/add-anchor-to-header-from-header-id.rb b/_plugins/add-anchor-to-header-from-header-id.rb index 8846b24..373389a 100644 --- a/_plugins/add-anchor-to-header-from-header-id.rb +++ b/_plugins/add-anchor-to-header-from-header-id.rb @@ -1,9 +1,11 @@ Jekyll::Hooks.register [:documents, :pages], :post_render do |doc| if doc.output_ext == ".html" && doc.type != :slides + lang = doc.data["lang"] + alt = doc.site.site_payload["site"]["t"]["alt"]["link_icon"][lang] doc.output = doc.output.gsub( /(.*?)<\/h[1-6]>/, - '
\5
' + '
\5
' ) end end -- cgit v1.2.3