From eaad8c14b21fa79c943a57cfcbcc504c88573e6b Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Wed, 19 Feb 2025 21:53:27 +0100 Subject: Render nofollow links for candidates --- cli/build.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cli/build.py') diff --git a/cli/build.py b/cli/build.py index f8fef5d..01bc020 100644 --- a/cli/build.py +++ b/cli/build.py @@ -51,11 +51,13 @@ def build(verbose): def render_link(value, classes): name = unidecode(value.name).lower().split(" ") domain = unidecode(value.domain).replace(".", "") + candidate = value.candidate + rel = ' rel="nofollow"' if candidate else "" res = [] for part in name: if part == domain: url = value.url or "https://" + value.domain - res.append(f'{value.domain}') + res.append(f'{value.domain}') else: res.append(part) return " ".join(res) -- cgit v1.3.1