Skip to content
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

Fix import prefix trailing slash #20

Merged
merged 1 commit into from
Aug 8, 2024
Merged

Fix import prefix trailing slash #20

merged 1 commit into from
Aug 8, 2024

Conversation

leighmcculloch
Copy link
Owner

What

Change the import prefix that gets rendered when the import prefix is a domain only with no path, to have no trailing slash.

Why

The templates that generate the pages always insert a slash at the end of the domain for the import prefix assuming a path follows, and when a path doesn't follow that results in a trailing slash.

Go import paths don't usually has trailing slashes on the end of the import path.

I suspect this might be the cause of why import prefixes for repos that don't have a path are not integrating well with pkg.go.dev.

Close #19

julienrbrt added a commit to cosmos/vanity that referenced this pull request Aug 1, 2024
tac0turtle pushed a commit to cosmos/vanity that referenced this pull request Aug 5, 2024
@leighmcculloch leighmcculloch marked this pull request as ready for review August 8, 2024 13:03
@leighmcculloch leighmcculloch merged commit 298ab36 into master Aug 8, 2024
2 checks passed
@leighmcculloch leighmcculloch deleted the i19 branch August 8, 2024 13:03
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.

Repository URL not available
1 participant