Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically generate un-hyphenated variants of permalinks #5099

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

captn3m0
Copy link
Member

@captn3m0 captn3m0 commented May 6, 2024

Fixes #2426

For more details, open the Copilot Workspace session.

@captn3m0 captn3m0 self-assigned this May 6, 2024
Copy link
Member

@marcwrobel marcwrobel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems _site/_redirects is completely messed up with this change: there are a lot of redirects added for unrelated product, such as:

diff --git i/toto w/toto
index ba376eaf..ff46302b 100644
--- i/toto
+++ w/toto
@@ -5,52 +5,1773 @@
 # Redirects for _redirects
 
 # Redirects for products/akeneo-pim.md
+/vuetify       /akeneo-pim
+/lua       /akeneo-pim
+/apiplatform       /akeneo-pim
+/splunk       /akeneo-pim
+/coldfusion       /akeneo-pim
+/opensearch       /akeneo-pim
+/contao       /akeneo-pim
+/filemaker       /akeneo-pim
+/iphone       /akeneo-pim
+/istio       /akeneo-pim
+/surface       /akeneo-pim
+/tomcat       /akeneo-pim
+/terraform       /akeneo-pim
+/grafana       /akeneo-pim
+/watchos       /akeneo-pim
+/artifactory       /akeneo-pim
+/nvidia       /akeneo-pim
+/amazoncdk       /akeneo-pim
+/nuxt       /akeneo-pim
+/consul       /akeneo-pim
+/php       /akeneo-pim

I don't know why, could you confirm ?

unhyphenated_permalink = permalink.delete('-')
alternate_urls = page.data['alternate_urls'] || []
unless alternate_urls.include?(unhyphenated_permalink)
alternate_urls << unhyphenated_permalink
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds permalink without hyphen to the alternate_urls list, which is not the expected behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alternate URLs: Always un-hyphenate
2 participants