You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2023/12/28 10:15:00 UTC

[jira] [Updated] (YUNIKORN-2256) Fix link error occurs when clicking link on page with trailing slash in the URL

     [ https://issues.apache.org/jira/browse/YUNIKORN-2256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated YUNIKORN-2256:
-------------------------------------
    Labels: pull-request-available  (was: )

> Fix link error occurs when clicking link on page with trailing slash in the URL
> -------------------------------------------------------------------------------
>
>                 Key: YUNIKORN-2256
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-2256
>             Project: Apache YuniKorn
>          Issue Type: Bug
>          Components: documentation, website
>            Reporter: Kuan-Po Tseng
>            Assignee: Kuan-Po Tseng
>            Priority: Minor
>              Labels: pull-request-available
>
> How to reproduce ?
> # navigating to https://yunikorn.apache.org/docs/design/user_group_resource_usage_enforcement
> # pressing F5
> # clicking on the link in the first paragraph of the document titled "user resource usage tracking in YuniKorn" results in a 404 not found error.
> The problem arises when pressing F5, as the page's URL automatically adds a "/", causing other links on the page to redirect to incorrect locations. For example, in step three, a 404 error occurs because the page redirects to https://yunikorn.apache.org/docs/design/user_group_resource_usage_enforcement/user_based_resource_usage_tracking. (Note that this still happened even if I cleared cache in browser so this is not a cache issue)
> However, this issue cannot be reproduced in the local development environment because pressing F5 does not automatically add a "/". I suspect this is a feature of the hosting service for the official website. Upon reviewing the Docusaurus documentation, I found a configuration option (https://docusaurus.io/docs/next/api/docusaurus-config#trailingSlash) that, when set to true, reproduces the same issue locally.
> IMO, we should set trailingSlash to true, and make all link anchor in markdown use relative markdown file path instead of url path. Doing this have three benefits.
> # let docusaurus autogenerated the right url link in output html
> # we can directly click the markdown link in code editor like VSCode to navigate to the right markdown file/paragraph
> # Avoid the inconsistent behavior between link with/without trailing /  by forcing trailingSlash to true, dev could easily found any url link issues in their laptop.
> [Note]: It seems that YUNIKORN-1380 verified that add {{customFields.trailingSlashes}} not work so that pr proposed absolute file paths to broken links. While I didn't find any setting named trailingSlashes in docusaurus document, I believe we could remove the setting too



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: issues-help@yunikorn.apache.org