Rename product slugs to match names and add redirects#146
Merged
Conversation
Rename the CCTV and package/system product pages so their slugs accurately match their titles and no longer embed prices. The CCTV and supreme/ultimate pairs were also swapped relative to their content: - cctv-package-1-999 -> cctv-package-2 (title: CCTV Package 2) - cctv-package-2-1199-... -> cctv-package-1 (title: CCTV Package 1) - supreme-package-...-1749 -> ultimate-package (title: Ultimate Package) - ultimate-package-...-1549 -> supreme-package (title: Supreme Package) Each renamed page gains a redirect_from entry pointing to its previous URL so existing links and search rankings continue to resolve. The date-prefixed products (burglar-alarm-battery, alarm-system-service- and-maintenance) already resolve to clean, price-free URLs, and basic-system/pet-package/standard-system were already correctly named with redirects, so they are unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015PuKxMjn85gGvhbpa3xXq1
The site's linkList filter looks up products by fileSlug via getBySlug, which throws (it does not follow redirects) when a referenced slug no longer exists. Renaming the product files broke the product references in several review front matters, failing the build. Point each affected review at the renamed product file, preserving the exact page each review was associated with: - products/cctv-package-2-1199-24hr-colour-cctv.md -> products/cctv-package-1.md - products/supreme-package-...-1749.md -> products/ultimate-package.md Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015PuKxMjn85gGvhbpa3xXq1
Expand the renamed CCTV and combined-package slugs so they retain the descriptive keywords the original price-based URLs carried, while still matching each product's name and omitting the price: - cctv-package-1 -> cctv-package-1-24hr-colour-cctv-built-in-microphone - cctv-package-2 -> cctv-package-2-24hr-colour-cctv-2-way-audio - ultimate-package -> ultimate-package-cctv-plus-burglar-alarm-system - supreme-package -> supreme-package-cctv-and-intruder-burglar-alarm-system The redirect_from entries still point at the original live URLs, and the review product references are updated to the new filenames. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015PuKxMjn85gGvhbpa3xXq1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Renames the product pages so each slug accurately matches its title and no longer embeds a price, and adds
redirect_fromentries pointing at the previous URLs so existing links and search rankings keep resolving.Notably, the CCTV pair and the supreme/ultimate pair had slugs that were swapped relative to their actual content, so the renames also correct that mismatch.
Renames
cctv-package-1-999cctv-package-2cctv-package-2-1199-24hr-colour-cctvcctv-package-1supreme-package-24hr-colour-cctv-plus-intruder-alarm-system-1749ultimate-packageultimate-package-cctv-intruder-alarm-system-1549supreme-packageEach renamed page now carries a
redirect_fromentry for its old/products/...URL.Left unchanged
burglar-alarm-batteryandalarm-system-service-and-maintenance— date-prefixed filenames that already resolve to clean, price-free URLs (the date is stripped from the permalink).basic-system,pet-package,standard-system— already correctly named and already carryredirect_fromentries for their previous price-based URLs.Notes
git mvto preserve history.redirect_fromentries, matching the existing redirect convention used elsewhere in the repo.🤖 Generated with Claude Code
https://claude.ai/code/session_015PuKxMjn85gGvhbpa3xXq1
Generated by Claude Code