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

Account for pathnames being part of the site config #856

Merged
merged 3 commits into from
Jul 26, 2021
Merged

Conversation

matthewp
Copy link
Contributor

Fixes #688

Changes

This makes it so that we use buildOptions.site consistently throughout the internals. Instead of just using it to get the origin, use it fully to construct URLs, which gives us correct URLs in the case where the site includes a pathname other than /.

Testing

Updated existing tests

Docs

Bug fix

@vercel
Copy link

vercel bot commented Jul 26, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

astro-www – ./www

🔍 Inspect: https://vercel.com/pikapkg/astro-www/NXqtDnTzmmCt98ZNyR3ka4rrKJk6
✅ Preview: https://astro-www-git-site-config-pikapkg.vercel.app

astro-docs – ./docs

🔍 Inspect: https://vercel.com/pikapkg/astro-docs/FVcTKmCTnSusgFn4s7dwXyhbZvyS
✅ Preview: https://astro-docs-git-site-config-pikapkg.vercel.app

@changeset-bot
Copy link

changeset-bot bot commented Jul 26, 2021

🦋 Changeset detected

Latest commit: a5a3321

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
astro Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@jasikpark jasikpark left a comment

Choose a reason for hiding this comment

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

This looks great!

packages/astro/src/runtime.ts Show resolved Hide resolved
@matthewp
Copy link
Contributor Author

Thanks!

@matthewp matthewp merged commit 4726e34 into main Jul 26, 2021
@matthewp matthewp deleted the site-config branch July 26, 2021 18:42
SiriousHunter pushed a commit to SiriousHunter/astro that referenced this pull request Feb 3, 2023
* Account for pathnames being part of the site config

* Adds a changeset

* Don't toString the site in the test
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.

🐛 BUG: astro.config.mjs buildOptions.site not respected
2 participants