From 87d0ce5fa211e2ef7cdad650899795ece651ebd9 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Thu, 14 Sep 2023 20:23:53 +0200 Subject: [PATCH] Add `in:title` qualifier for discussion links Reduces the number of false positives in search. --- blog/templates/snippets.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/templates/snippets.html b/blog/templates/snippets.html index e5cae6c4..8fbd031b 100644 --- a/blog/templates/snippets.html +++ b/blog/templates/snippets.html @@ -24,7 +24,7 @@ {% if search_term is number %} {% set discussion_url = "https://github.com/phil-opp/blog_os/discussions/" ~ search_term %} {% else %} - {% set search_term_encoded = `"` ~ search_term ~ `"` | urlencode %} + {% set search_term_encoded = `"` ~ search_term ~ `"` ~ ` in:title` | urlencode %} {% set discussion_url = `https://github.com/phil-opp/blog_os/discussions/categories/` ~ category_path ~ `?discussions_q=` ~ search_term_encoded %} {% endif %}