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

🐛 BUG: Astro.glob always omits trailing slash, even if trailingSlash is set to always #3314

Closed
1 task
NotWoods opened this issue May 7, 2022 · 3 comments
Labels
- P2: nice to have Not breaking anything but nice to have (priority)

Comments

@NotWoods
Copy link

NotWoods commented May 7, 2022

What version of astro are you using?

1.0.0-beta.27

Are you using an SSR adapter? If so, which one?

Netlify

What package manager are you using?

npm

What operating system are you using?

Windows

Describe the Bug

I want to use Astro.glob() to get a collection of my pages, and I expect page.url to correspond to the URL that the server will be sending. Not doing so causes unwanted redirects, and the dev server often doesn't even redirect me.

Link to Minimal Reproducible Example

https://codesandbox.io/s/hopeful-panini-5rpj4y?file=/src/pages/index.astro

Participation

  • I am willing to submit a pull request for this issue.
@natemoo-re natemoo-re added - P2: nice to have Not breaking anything but nice to have (priority) s1-small and removed bb:investigate labels May 10, 2022
@natemoo-re
Copy link
Member

Seems like this should have been fixed in #3198, but maybe we're still missing something.

Mind taking a look @JuanM04?

@JuanM04
Copy link
Contributor

JuanM04 commented May 11, 2022

I can't reproduce the error 🤔. The example button points to /projects/, right? Do you expect /projects?

@tatethurston
Copy link

tatethurston commented Jul 29, 2022

On 1.0.0-beta.73 I'm seeing trailing slashes when using Astro.glob() and trailingSlash: 'always', as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P2: nice to have Not breaking anything but nice to have (priority)
Projects
None yet
Development

No branches or pull requests

5 participants