Skip to content

Fix duplicating text in URL when navigating to pages in Documentation#977

Merged
SbloodyS merged 1 commit intoapache:masterfrom
KhanhDoHoang:khanhdohoang-Fix/ReplaceDeadlLinks
May 3, 2025
Merged

Fix duplicating text in URL when navigating to pages in Documentation#977
SbloodyS merged 1 commit intoapache:masterfrom
KhanhDoHoang:khanhdohoang-Fix/ReplaceDeadlLinks

Conversation

@KhanhDoHoang
Copy link
Contributor

@KhanhDoHoang KhanhDoHoang commented Apr 26, 2025

Issues:

  • Navigating from specific pages to another in Documentation, causing duplicate text in the URL, e.g, https://dolphinscheduler.apache.org/en-us/docs/3.3.0-alpha/guide/installation//en-us/docs/3.3.0-alpha/guide/installation/cluster
    image

Causes:

  • Having multiple repeated replaceAll.
  • E.g: Having cluster.md replaceAll to /en-us/docs/3.3.0-alpha/guide/installation/cluster, then another replaceAll for installation/cluster.md to again /en-us/docs/3.3.0-alpha/guide/installation/cluster. Causing duplicates in routing URL

Fixes:

  • Using regex to match possible route, it will match cluster.md, installation/cluster.md, avoiding duplicate replaceAll usage.

@KhanhDoHoang KhanhDoHoang changed the title Update regex for replaced link script Fix duplicating text in URL when navigating to pages in Documentation Apr 26, 2025
Copy link
Member

@SbloodyS SbloodyS left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

@SbloodyS SbloodyS merged commit bee8d45 into apache:master May 3, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants