Skip to content

fix: remove basePath from llms.txt URL generation to avoid duplicated paths#139

Merged
aszenz merged 1 commit intomasterfrom
claude/fix-llms-txt-urls-K8oPI
Feb 6, 2026
Merged

fix: remove basePath from llms.txt URL generation to avoid duplicated paths#139
aszenz merged 1 commit intomasterfrom
claude/fix-llms-txt-urls-K8oPI

Conversation

@aszenz
Copy link
Owner

@aszenz aszenz commented Feb 6, 2026

SITE_URL already includes the base path (e.g., https://aszenz.github.io/data-explorer),
so appending basePath again caused URLs like /data-explorer/data-explorer/.

https://claude.ai/code/session_013EEswtBtNGKgqVDj7GPw6j

… paths

SITE_URL already includes the base path (e.g., https://aszenz.github.io/data-explorer),
so appending basePath again caused URLs like /data-explorer/data-explorer/.

https://claude.ai/code/session_013EEswtBtNGKgqVDj7GPw6j
Copilot AI review requested due to automatic review settings February 6, 2026 09:28
@aszenz aszenz merged commit 8f7a9cc into master Feb 6, 2026
5 of 6 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug in the llms.txt URL generation where paths were being duplicated (e.g., /data-explorer/data-explorer/) because the basePath was being appended to SITE_URL which already contained the full base URL including the path.

Changes:

  • Removed basePath parameter from GeneratorOptions interface and all related function signatures
  • Updated URL generation logic to use siteUrl directly instead of concatenating siteUrl with basePath
  • Removed the basePath: config.base argument from the plugin's call to generateLlmsTxtContent

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/llms-txt/generator.ts Removed basePath from GeneratorOptions interface and updated generateHeader, generateOverview, and generateModelsSection functions to use siteUrl directly
plugins/vite-plugin-llms-txt.ts Removed basePath: config.base from the generateLlmsTxtContent function call

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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