1
0
Fork 0
isopod.cool/blog/posts/guide_blacklist_websites_searxng/index.php

38 lines
2.1 KiB
PHP
Raw Normal View History

2023-09-02 12:01:53 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Guide - Blacklisting Websites in SearXNG</title>
2024-01-04 15:02:57 +00:00
<link href="/style.css" rel="stylesheet" type="text/css" media="all">
<link href="/blog/comment/comments.css" rel="stylesheet" type="text/css" media="all">
2023-09-02 12:01:53 +00:00
<style>
h1 {
background-image: url('searxng.svg');
}
</style>
</head>
<body>
v3.1 - Minor overhaul to the entire site - Removed some unused files - Updated the blog post layout to have all the navigation - Replaced hovertext in blog posts with footnotes - Seaonal pride captions on homepage - Updated /etc/quotes/ - Background color is now actually reminiscent of Discord - Total overhaul to /uses/ - Added sub-page for my computer - New markup for blockquotes that css-tricks.com says is more semantically correct - More difficult captcha on the guestbook (answer remains unchanged) - New blog post about DMs on the fediverse - Blog now has links to each year - Removed journal. I barely used it and it was redundant anyway - Removed the TODO list that I wasn't using from /etc/ - CSS overhaul: - Cool new hover animation on navigation links - Centralized most color definitions to root variables, and a couple other things too - Standard font is now B612 mono - complies with prefers-reduced-motion - Light theme and low contrast mode in the works - Made tables more consistent, and the one on /about/ no longer looks like doodoo - Accent borders on headings and such-like - Main header & caption are now left-aligned instead of center-aligned - Isopod letterhead moved from left side of header to right - h1 made smaller, h2-6 changed back to default sizes - Adjusted a couple background positions to improve readability - Got rid of the checkbox-hack dropdown navigation on mobile, because it kind of sucked - Regular body text no longer has text-shadow - probably some other stuff I forgot about
2024-07-08 09:20:49 +00:00
<?php include($_SERVER['DOCUMENT_ROOT'] . '/nav.php'); ?>
2023-09-02 12:01:53 +00:00
<h1>guide:</h1>
<h2 id="caption">Blacklisting Websites in SearXNG</h2>
<?php include("../post_dates.php"); ?>
2023-09-02 12:01:53 +00:00
<p>Quick one today. I got sick of searching for programming questions and seeing AI-generated scraped-from-stackoverflow click farm trash polluting the results, and I happen to use a personal SearXNG instance that no client-side blacklist extension on the planet is gonna support, so I went looking to see if I could blacklist them in SearXNG for like the eighth time and finally found a way using the hostname replace plugin. So here's that, because I didn't find this feature documented officially anywhere bar an <a href="https://github.com/searxng/searxng/discussions/970" target="_blank">issue</a> on the Github repo.</p>
<h2>How to do it</h2>
<p>First, open up your instance's config file. If you installed it directly like I did, that'll probably be <code>/etc/searxng/settings.yml</code>. If you used Docker, god help you. Anyway, find the <code>enabled_plugins:</code> section and uncomment the entry for <code>'Hostname replace'</code>, then uncomment the line <code>hostname_replace:</code> just below it. Under there you'll put your blocks:</p>
<code>
<span class="codetitle">/etc/searxng/settings.yml</span>
enabled_plugins:<br>
&nbsp;&nbsp;- 'Hostname replace'<br><br>
hostname_replace:<br>
&nbsp;&nbsp;'(.*\.)?codegrepper\.com': false<br>
&nbsp;&nbsp;'(.*\.)?geeksforgeeks\.org': false
</code>
<p>Then restart SearXNG:</p>
<code>
$ service uwsgi restart searxng
</code>
2024-01-04 15:02:57 +00:00
<?php include("../../comment/form.php"); ?>
2023-09-02 12:01:53 +00:00
</body>
</html>