Skip to content

Conversation

@devongovett
Copy link
Member

@devongovett devongovett commented Nov 25, 2025

Removes the .html extension from all docs URLs. The CDN will automatically return either HTML or Markdown depending on the Accept header, and the URLs also look a bit cleaner this way.

Updates the build to split the URL structure into separate domains for react-aria and react-spectrum. Locally, by default, there is still only a single server so http://localhost:1234/s2 and http://localhost:1234/react-aria (internationalized moved under react-aria). But in the build (or optionally locally), there are two separate Parcel builds for these, and they cross-link to each other. The list of pages has their URLs normalized so we always have absolute URLs with the correct domains attached according to the environment.

@rspbot
Copy link

rspbot commented Nov 25, 2025

Copy link
Member

@reidbarber reidbarber left a comment

Choose a reason for hiding this comment

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

Looks like the index links are broken

@rspbot
Copy link

rspbot commented Nov 26, 2025

# Conflicts:
#	packages/dev/s2-docs/pages/react-aria/GridList.mdx
#	packages/dev/s2-docs/pages/react-aria/Table.mdx
#	packages/dev/s2-docs/pages/react-aria/Tree.mdx
#	packages/dev/s2-docs/pages/s2/CardView.mdx
#	packages/dev/s2-docs/pages/s2/TableView.mdx
#	packages/dev/s2-docs/pages/s2/TreeView.mdx
#	packages/dev/s2-docs/src/Header.tsx
#	packages/dev/s2-docs/src/NavigationSuspense.tsx
@rspbot
Copy link

rspbot commented Nov 26, 2025

@devongovett devongovett changed the title docs: Remove html extension from URLs docs: Update URL structure Nov 26, 2025
@rspbot
Copy link

rspbot commented Nov 26, 2025

// eslint-disable-next-line
import {transformAsync} from '@parcel/rust/lib/index.js';

export const getPages = cache(async () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

This parses all MDX files so we have a complete list of pages, even when the Parcel build doesn't include all of them (building only S2 or RAC). Using an internal Parcel utility here for performance (the pages get parsed in parallel in Rust). Will have to keep this up to date with Parcel upgrades. Ideally there'd be a public utility for this.

reidbarber
reidbarber previously approved these changes Nov 26, 2025
# Conflicts:
#	packages/dev/s2-docs/pages/s2/index.mdx
#	packages/dev/s2-docs/src/Layout.tsx
#	packages/dev/s2-docs/src/MobileSearchMenu.tsx
#	packages/dev/s2-docs/src/SearchMenu.tsx
@rspbot
Copy link

rspbot commented Nov 27, 2025

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.

4 participants