diff --git a/build.py b/build.py index b3c1ce36..31abb335 100644 --- a/build.py +++ b/build.py @@ -76,12 +76,6 @@ TOPICS = [ {"slug": "vacation", "name": "Dad Jokes About Vacation", "emoji": "🏖️", "intro": "Time to pack your bags and your best puns! These dad jokes about vacation will have you laughing all the way to your destination.", "keywords": r"\b(vacation|trip|travel|holiday|packing)\b"}, - {"slug": "work", "name": "Dad Jokes About Work", "emoji": "🏢", - "intro": "Don't work too hard... unless it's working on your punchlines. These dad jokes about work are perfect for the water cooler.", - "keywords": r"\b(work|office|job|boss|meeting)\b"}, - {"slug": "kids", "name": "Dad Jokes About Kids", "emoji": "👶", - "intro": "They grow up so fast, but these jokes never get old. Here are the best dad jokes about kids.", - "keywords": r"\b(kid|child|children|son|daughter)\b"}, {"slug": "food", "name": "Dad Jokes About Food", "emoji": "🍔", "intro": "Hungry for a laugh? These dad jokes about food will hit the spot.", "keywords": r"\b(food|eat|dinner|lunch|breakfast|hungry|pizza|coffee|cheese|lettuce)\b"}, diff --git a/nginx.conf b/nginx.conf index 6e9a6589..9c3c4a34 100644 --- a/nginx.conf +++ b/nginx.conf @@ -30,6 +30,13 @@ http { add_header Permissions-Policy "geolocation=(), microphone=(), camera=()" always; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; } + # Redirect old short topic slugs to long-tail canonical URLs + location = /topic/work/ { + return 301 /topic/work-dad-jokes/; + } + location = /topic/kids/ { + return 301 /topic/dad-jokes-for-kids/; + } location / { try_files $uri $uri/ $uri/index.html =404; }