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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 BUG: Base path doesn't change #2163

Closed
Olyno opened this issue Dec 8, 2021 · 3 comments
Closed

馃悰 BUG: Base path doesn't change #2163

Olyno opened this issue Dec 8, 2021 · 3 comments
Assignees

Comments

@Olyno
Copy link

Olyno commented Dec 8, 2021

What version of astro are you using?

^0.21.11

What package manager are you using?

Yarn

What operating system are you using?

Linux

Describe the Bug

When building my site with another base path than /, it simply doesn't change it at build.

Link to Minimal Reproducible Example

https://github.com/Olyno/astro-base-bug

@github-actions github-actions bot added this to Needs Triage in 馃悰 Bug Tracker Dec 8, 2021
@jonathantneal
Copy link
Contributor

In Astro, I think vite.base is overwritten by buildOptions.site.

Some notes:

  • Astro requires a complete URL, so buildOptions.site needs to be a complete URL, like http://awesome/lol/. However, all of the HTML links appear to be relative, and only sitemap.xml uses the complete URL.
  • In development, relative links like <img src="./assets/logo.svg" alt="Astro logo" /> may not work correctly in development (@matthewp).

Example

@jonathantneal jonathantneal moved this from Needs Triage to Needs Information in 馃悰 Bug Tracker Dec 14, 2021
@tony-sull
Copy link
Contributor

Hey, this issue is out of date and may have been fixed in the latest version of Astro. If you can still reproduce the issue with the latest version of astro (npm install astro@next) please open a new issue and we can take a deeper look. 馃憤

This should be taken care of with a few recent fixes for building to subdirectories, as well as a chagne to how relative vs. absolute paths are handled. Open a new issue if you run into this again in astro@latest and we'll dig deeper!

馃悰 Bug Tracker automation moved this from Needs Information to Done Feb 15, 2022
@Olyno
Copy link
Author

Olyno commented Dec 1, 2022

Hi 馃憢馃徎 Coming back on this issue, i still have this issue with latest version of Astro. I updated the reproduction repository: https://github.com/Olyno/astro-base-bug

Edit: Moving to #4229, which is the same issue but with more informations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

4 participants