From a53d53e1f95d84b23cffb9a5d43f1a70a412b6fe Mon Sep 17 00:00:00 2001
From: "(quasar) nebula" <qznebula@protonmail.com>
Date: Tue, 19 Sep 2023 17:23:05 -0300
Subject: page: don't generate redirect from directory to same directory

---
 src/page/artist-alias.js | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'src/page')

diff --git a/src/page/artist-alias.js b/src/page/artist-alias.js
index 1da2af41..d2305229 100644
--- a/src/page/artist-alias.js
+++ b/src/page/artist-alias.js
@@ -7,6 +7,12 @@ export function targets({wikiData}) {
 export function pathsForTarget(aliasArtist) {
   const {aliasedArtist} = aliasArtist;
 
+  // Don't generate a redirect page if this aliased name resolves to the same
+  // directory as the original artist! See issue #280.
+  if (aliasArtist.directory === aliasedArtist.directory) {
+    return [];
+  }
+
   return [
     {
       type: 'redirect',
-- 
cgit 1.3.0-6-gf8a5