Skip to content

Commit

Permalink
Add in:title qualifier for discussion links
Browse files Browse the repository at this point in the history
Reduces the number of false positives in search.
  • Loading branch information
phil-opp committed Sep 14, 2023
1 parent 5b67cb0 commit 87d0ce5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blog/templates/snippets.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

Expand Down

0 comments on commit 87d0ce5

Please sign in to comment.