Skip to content

Fix ref links across all documentation pages #1936

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

Closed
wants to merge 3 commits into from

Conversation

nvborisenko
Copy link
Member

@nvborisenko nvborisenko commented Sep 10, 2024

User description

Description

I tried to build web site locally, and got build errors (~35 errors):

ERROR [ja] REF_NOT_FOUND: Ref "/advanced_features": "d:\SeleniumHQ\seleniumhq.github.io\website_and_docs\content\documentation\grid\getting_started.ja.md:315:23": page not found
ERROR Failed to read Git log: access denied: "git" is not whitelisted in policy "security.exec.allow"

Probably this is because my loccal hugo version is newer than used in CI build. I use v0.134.1

Motivation and Context

Fix local build.

Types of changes

  • Change to the site (I have double-checked the Netlify deployment, and my changes look good)
  • Code example added (and I also added the example to all translated languages)
  • Improved translation
  • Added new translation (and I also added a notice to each document missing translation)

Checklist

  • I have read the contributing document.
  • I have used hugo to render the site/docs locally and I am sure it works.

PR Type

documentation, configuration changes


Description

  • Fixed numerous reference links across multiple documentation files by removing leading slashes to ensure proper linking.
  • Updated the Hugo configuration to allow git as an executable, resolving build issues related to Git log access.

Changes walkthrough 📝

Relevant files
Documentation
21 files
_index.ja.md
Fix reference links in Japanese documentation index           

website_and_docs/content/documentation/_index.ja.md

  • Fixed reference links by removing leading slashes.
  • Updated internal documentation links for consistency.
  • +2/-2     
    _index.pt-br.md
    Correct reference links in Portuguese documentation index

    website_and_docs/content/documentation/_index.pt-br.md

  • Corrected reference links by removing leading slashes.
  • Ensured internal links are consistent.
  • +1/-1     
    _index.zh-cn.md
    Update reference links in Chinese documentation index       

    website_and_docs/content/documentation/_index.zh-cn.md

  • Updated reference links by removing leading slashes.
  • Improved consistency of internal links.
  • +2/-2     
    components.en.md
    Fix configuration link in English grid components documentation

    website_and_docs/content/documentation/grid/components.en.md

    • Fixed configuration reference link by removing leading slash.
    +1/-1     
    components.ja.md
    Correct configuration link in Japanese grid components documentation

    website_and_docs/content/documentation/grid/components.ja.md

    • Corrected configuration reference link by removing leading slash.
    +1/-1     
    components.pt-br.md
    Fix configuration link in Portuguese grid components documentation

    website_and_docs/content/documentation/grid/components.pt-br.md

    • Fixed configuration reference link by removing leading slash.
    +1/-1     
    components.zh-cn.md
    Update configuration link in Chinese grid components documentation

    website_and_docs/content/documentation/grid/components.zh-cn.md

    • Updated configuration reference link by removing leading slash.
    +1/-1     
    getting_started.en.md
    Fix reference links in English grid getting started documentation

    website_and_docs/content/documentation/grid/getting_started.en.md

    • Fixed multiple reference links by removing leading slashes.
    +3/-3     
    getting_started.ja.md
    Correct reference links in Japanese grid getting started documentation

    website_and_docs/content/documentation/grid/getting_started.ja.md

    • Corrected multiple reference links by removing leading slashes.
    +2/-2     
    getting_started.pt-br.md
    Fix reference links in Portuguese grid getting started documentation

    website_and_docs/content/documentation/grid/getting_started.pt-br.md

    • Fixed multiple reference links by removing leading slashes.
    +3/-3     
    getting_started.zh-cn.md
    Update reference links in Chinese grid getting started documentation

    website_and_docs/content/documentation/grid/getting_started.zh-cn.md

    • Updated multiple reference links by removing leading slashes.
    +3/-3     
    _index.ja.md
    Fix reference links in Japanese overview documentation     

    website_and_docs/content/documentation/overview/_index.ja.md

  • Fixed WebDriver and Grid reference links by removing leading slashes.
  • +2/-2     
    _index.pt-br.md
    Correct reference links in Portuguese overview documentation

    website_and_docs/content/documentation/overview/_index.pt-br.md

  • Corrected WebDriver and Grid reference links by removing leading
    slashes.
  • +2/-2     
    _index.zh-cn.md
    Update reference links in Chinese overview documentation 

    website_and_docs/content/documentation/overview/_index.zh-cn.md

  • Updated WebDriver and Grid reference links by removing leading
    slashes.
  • +2/-2     
    details.ja.md
    Fix Grid reference link in Japanese overview details         

    website_and_docs/content/documentation/overview/details.ja.md

    • Fixed Grid reference link by removing leading slash.
    +1/-1     
    details.pt-br.md
    Correct Grid reference link in Portuguese overview details

    website_and_docs/content/documentation/overview/details.pt-br.md

    • Corrected Grid reference link by removing leading slash.
    +1/-1     
    details.zh-cn.md
    Update Grid reference link in Chinese overview details     

    website_and_docs/content/documentation/overview/details.zh-cn.md

    • Updated Grid reference link by removing leading slash.
    +1/-1     
    overview.en.md
    Fix reference links in English test practices overview     

    website_and_docs/content/documentation/test_practices/overview.en.md

  • Fixed race conditions and page object model reference links by
    removing leading slashes.
  • +2/-2     
    overview.ja.md
    Correct reference links in Japanese test practices overview

    website_and_docs/content/documentation/test_practices/overview.ja.md

  • Corrected race conditions and page object model reference links by
    removing leading slashes.
  • +2/-2     
    overview.pt-br.md
    Fix reference links in Portuguese test practices overview

    website_and_docs/content/documentation/test_practices/overview.pt-br.md

  • Fixed race conditions and page object model reference links by
    removing leading slashes.
  • +2/-2     
    overview.zh-cn.md
    Update reference links in Chinese test practices overview

    website_and_docs/content/documentation/test_practices/overview.zh-cn.md

  • Updated race conditions and page object model reference links by
    removing leading slashes.
  • +2/-2     
    Configuration changes
    1 files
    hugo.toml
    Allow `git` in Hugo security configuration                             

    website_and_docs/hugo.toml

  • Added git to the list of allowed executables in the security
    configuration.
  • +1/-1     

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    Copy link

    netlify bot commented Sep 10, 2024

    👷 Deploy request for selenium-dev pending review.

    Visit the deploys page to approve it

    Name Link
    🔨 Latest commit 9481de5

    @qodo-merge-pro qodo-merge-pro bot added documentation Improvements or additions to documentation configuration changes labels Sep 10, 2024
    Copy link
    Contributor

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Key issues to review

    Broken Links
    Multiple reference links were fixed by removing leading slashes. This could potentially break existing links if not done consistently across all pages.

    Copy link
    Contributor

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Enhancement
    Replace the term "競合状態" with a more specific and easily understandable Japanese term for race conditions in browser automation

    Consider using a more specific term instead of "競合状態" to describe race conditions in
    the context of browser automation. A term like "タイミング問題" or "同期の問題" might be more
    appropriate and easier to understand for Japanese readers.

    website_and_docs/content/documentation/test_practices/overview.ja.md [28]

    -後の章では、特にブラウザーとWebDriver間の[競合状態を克服する]({{< ref "waits.md" >}})方法に関する、テストでの断続的な問題を軽減するために使用できる手法に戻ります。
    +後の章では、特にブラウザーとWebDriver間の[タイミング問題を解決する]({{< ref "waits.md" >}})方法に関する、テストでの断続的な問題を軽減するために使用できる手法に戻ります。
     
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: The suggestion improves clarity for Japanese readers by using a more specific term for race conditions, which can enhance understanding in the context of browser automation.

    7
    Use a more specific Chinese term for "Components" in the reference link text to improve clarity for Chinese readers

    Consider using a more specific Chinese term for "Components" in the reference link
    text. A term like "组件配置" or "网格组件" might be more descriptive and helpful for Chinese
    readers.

    website_and_docs/content/documentation/grid/getting_started.zh-cn.md [212]

    -为简单起见,本页中显示的所有命令示例均假定组件正在运行在本地。更详细的示例和用法可以在[配置组件]({{< ref "configuration" >}}) 部分。
    +为简单起见,本页中显示的所有命令示例均假定组件正在运行在本地。更详细的示例和用法可以在[配置网格组件]({{< ref "configuration" >}}) 部分。
     
    • Apply this suggestion
    Suggestion importance[1-10]: 6

    Why: The suggestion enhances clarity by using a more descriptive term for "Components," which can help Chinese readers better understand the context.

    6
    Add a brief explanation of what "slots" mean in the context of Selenium Grid to improve clarity for readers

    Consider adding a brief explanation of what "slots" are in the context of Selenium
    Grid. This can help readers who are new to Grid understand the concept better.

    website_and_docs/content/documentation/grid/components.en.md [89-91]

    -It also creates one slot per available CPU for Chromium based browsers and Firefox. For Safari, only one slot is 
    +It also creates one slot (a concurrent session capability) per available CPU for Chromium based browsers and Firefox. For Safari, only one slot is 
     created. Through a specific [configuration]({{< ref "configuration" >}}), it can run sessions in Docker 
     containers or relay commands.
     
    • Apply this suggestion
    Suggestion importance[1-10]: 6

    Why: The suggestion improves clarity by explaining "slots," which can help readers unfamiliar with Selenium Grid understand the concept better.

    6
    Add a brief description of the Configuration section's content to provide more context for readers

    Consider adding a brief description of what the Configuration section covers to
    provide more context for the reader. This can help users decide if they need to
    refer to that section.

    website_and_docs/content/documentation/grid/getting_started.en.md [219]

    -[Configuring Components]({{< ref "configuration" >}}) section.
    +[Configuring Components]({{< ref "configuration" >}}) section, which covers detailed setup options for Grid components.
     
    • Apply this suggestion
    Suggestion importance[1-10]: 5

    Why: Adding a brief description provides additional context, helping users decide if they need to refer to the Configuration section, although it is not crucial.

    5
    Best practice
    Sort the list of allowed executables alphabetically

    Consider sorting the list of allowed executables alphabetically for better
    readability and easier maintenance.

    website_and_docs/hugo.toml [343]

    -allow = ['^dart-sass-embedded$', '^go$', '^npx$', '^postcss$', '^git$']
    +allow = ['^dart-sass-embedded$', '^git$', '^go$', '^npx$', '^postcss$']
     
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: Sorting the list alphabetically improves readability and maintainability, making it easier to locate specific entries and manage the list in the future.

    7
    Maintainability
    Use relative links for internal documentation references instead of Hugo shortcodes

    Consider using a relative link instead of the Hugo shortcode for internal
    documentation references. This can improve maintainability and make the content more
    portable.

    website_and_docs/content/documentation/_index.pt-br.md [27]

    -No núcleo do Selenium está [WebDriver]({{< ref "webdriver.md" >}}),
    +No núcleo do Selenium está [WebDriver](./webdriver),
     
    • Apply this suggestion
    Suggestion importance[1-10]: 5

    Why: While using relative links can improve portability, the current use of Hugo shortcodes is a common practice in Hugo-based sites for managing internal links, and changing them might not be necessary unless there's a specific reason to do so.

    5
    Replace Hugo shortcode with a relative link for internal documentation reference

    Similar to the previous suggestion, consider using a relative link instead of the
    Hugo shortcode for internal documentation references to improve maintainability and
    portability.

    website_and_docs/content/documentation/overview/details.pt-br.md [59]

    -sua [Grid de navegadores]({{< ref "grid.md" >}})
    +sua [Grid de navegadores](../grid)
     
    • Apply this suggestion
    Suggestion importance[1-10]: 5

    Why: Similar to the previous suggestion, using relative links can enhance portability, but the existing Hugo shortcode is standard for Hugo sites, and changing it might not be needed unless there's a specific requirement.

    5

    @nvborisenko nvborisenko mentioned this pull request Sep 10, 2024
    6 tasks
    @harsha509
    Copy link
    Member

    replaced by #1937!

    @harsha509 harsha509 closed this Sep 10, 2024
    @harsha509
    Copy link
    Member

    I intentionally merged #1937, so we can close this !

    @nvborisenko nvborisenko deleted the fix-ref-link branch September 10, 2024 11:05
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants