grgr.me

latest commits to https://grgr.me/
Log | Files | Refs

commit d537b9b089b7d6609636e73f5d6904c8062edc75
parent a58968eb445d17d90956a69c9069bcba24d13724
Author: corndog <cauchyn@firemail.cc>
Date:   Sun, 24 Mar 2019 11:44:38 -0700

Semantically hint external sites

The simplistic matching will catch me if a static
link contains "grgr.me" in any form. Fine for now.

Diffstat:
Mconfig | 2+-
Aexternal.lua | 9+++++++++
2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/config b/config @@ -7,7 +7,7 @@ URL = https://grgr.me/ *.md: config inner-template - external pandoc --to html --lua-filter wordcount.lua --lua-filter anchor.lua + external pandoc --to html --lua-filter wordcount.lua --lua-filter anchor.lua --lua-filter external.lua external python3 youtube-embed.py template page ext .html diff --git a/external.lua b/external.lua @@ -0,0 +1,9 @@ +function external(link) + href = link.target + if string.find(href, "^http") and not string.find(href, "grgr.me") then + table.insert(link.attributes, {"rel", "external"}) + end + return link +end + +return {{Link = external}}