9be2f36883
- 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
37 lines
2.1 KiB
PHP
37 lines
2.1 KiB
PHP
<!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>
|
|
<link href="/style.css" rel="stylesheet" type="text/css" media="all">
|
|
<link href="/blog/comment/comments.css" rel="stylesheet" type="text/css" media="all">
|
|
<style>
|
|
h1 {
|
|
background-image: url('searxng.svg');
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<?php include($_SERVER['DOCUMENT_ROOT'] . '/nav.php'); ?>
|
|
<h1>guide:</h1>
|
|
<h2 id="caption">Blacklisting Websites in SearXNG</h2>
|
|
<?php include("../post_dates.php"); ?>
|
|
<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>
|
|
- 'Hostname replace'<br><br>
|
|
hostname_replace:<br>
|
|
'(.*\.)?codegrepper\.com': false<br>
|
|
'(.*\.)?geeksforgeeks\.org': false
|
|
</code>
|
|
<p>Then restart SearXNG:</p>
|
|
<code>
|
|
$ service uwsgi restart searxng
|
|
</code>
|
|
<?php include("../../comment/form.php"); ?>
|
|
</body>
|
|
</html>
|