Skip to content

Conversation

@Devon-White
Copy link
Collaborator

Moves the CopyPageContents button from before the MDXContent to after the breadcrumbs.

Helps the layout of the page shift less if not at all (regardless if button is present or not)

Devon-White and others added 21 commits October 2, 2025 06:21
- Updated `formatUrl` function to use more generic file handling options.
- Enhanced `useCopyActions` hook to support viewing markdown files in a new tab.
- Modified `useCopyButtonConfig` to include display options and content strategy.
- Added `shouldDisplay` property to `useCopyContentData` for better control over visibility.
- Improved `DropdownMenu` to conditionally render copy and view markdown options.
- Updated `CopyPageContent` to check display configurations before rendering.
- Enhanced Docusaurus configuration to support new features and better markdown handling.
- Introduced `CopyIcon` component for consistent icon usage in the dropdown menu.
Fixes three related issues with URL generation in markdown files and llms.txt:

1. Fix baseUrl duplication when relativePaths: false
   - Strip baseUrl from targetPath before normalizing to prevent duplication
   - Extract pathname from full URLs in stripBaseUrl()

2. Fix extra slash before .md extension with trailingSlash: true
   - Remove trailing slash before adding .md extension in formatUrl()

3. Fix missing baseUrl in llms.txt when relativePaths: true
   - Prepend baseUrl pathname when missing from targetPath
   - Defensive check to ensure baseUrl is included for relative paths

All fixes centralized in formatUrl() for maintainability.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@Devon-White Devon-White merged commit a6fbc74 into main Oct 28, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants