Skip to content

docs: force no trailing slash#3287

Open
shimanek wants to merge 1 commit intometa-pytorch:mainfrom
shimanek:main
Open

docs: force no trailing slash#3287
shimanek wants to merge 1 commit intometa-pytorch:mainfrom
shimanek:main

Conversation

@shimanek
Copy link
Copy Markdown

Motivation

I noticed on the documentation site that some links appeared to be broken. Looking into it, I think it's due to the trailing slash of addresses being rendered in some cases and not in others.

For example, going to the main site > Docs > Basic Concepts > Acquisition Functions

The address is then
https://botorch.org/docs/acquisition
but when I refresh (on Firefox), the address becomes
https://botorch.org/docs/acquisition/
so that the relative link ("... counterpart qExpectedImprovement can be found in this tutorial.") goes to
https://botorch.org/docs/acquisition/tutorials/compare_mc_analytic_acquisition
instead of
https://botorch.org/docs/tutorials/compare_mc_analytic_acquisition

I reproduced this locally by adding a setting of
"trailingSlash": true

To keep using relative links, I think the easiest fix is to specify
"trailingSlash": false

But just thought I'd point it out.

Have you read the Contributing Guidelines on pull requests?

Yes.

Test Plan

Reproduced site issue locally and tested fix locally.

Related PRs

None found.

@meta-cla meta-cla Bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Apr 23, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.98%. Comparing base (b3c6862) to head (0f8da38).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3287   +/-   ##
=======================================
  Coverage   99.98%   99.98%           
=======================================
  Files         225      225           
  Lines       22158    22158           
=======================================
  Hits        22154    22154           
  Misses          4        4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@esantorella
Copy link
Copy Markdown
Contributor

Thanks so much for the fix! This has been an issue in the past that we haven't resolved comprehensively (e.g. #2972 ).

@CristianLara Does this seem like the right fix to you?

Although this sounds like the right fix to me, I'm a bit confused, because botorch.org is hosted by GitHub Pages, and this Docusaurus page claims that "GitHub Pages adds a trailing slash to Docusaurus URLs by default." But based on what we've seen and Cris's past comments, maybe that is not true 100% of the time? Also, I want to make sure we don't have URLs that will be broken by the addition of a trailing slash. I tried to reproduce this locally on Chrome but couldn't generate the trailing slash issue.

@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Apr 24, 2026

@esantorella has imported this pull request. If you are a Meta employee, you can view this in D102347455.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants