-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Shorter Relative Path #8191
Shorter Relative Path #8191
Conversation
The relative path `const allPosts = await Astro.glob('./posts/*.md');` works as well as `const myPosts = await Astro.glob('../pages/posts/*.md');`. The latter unnecessarily returns to the pages folder.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hello! Thank you for opening your first PR to Astro’s Docs! 🎉 Here’s what will happen next:
|
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
Hi @felipeaprotazio , thank you for submitting this fix! Yes, you're right, we can make the path shorter here. In fact, I reviewed everywhere to make sure that if we change this line, we change it in every place, and there is one more place it needs updating: line 51. Would you please make the change there too, and then I think we have every occurance! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this contribution @felipeaprotazio , and welcome to Team Docs!
* i18n(fr): Update `tutorial/0-introduction/1.mdx` from #8239 * i18n(fr): Update `tutorial/2-pages/2.mdx` from #8318 * i18n(fr): Update `tutorial/2-pages/2.mdx` from #8543 * i18n(fr): Update `tutorial/3-components/1.mdx` from #8300 * i18n(fr): Update `tutorial/4-layouts/1.mdx` from #8303 * i18n(fr): Update `tutorial/4-layouts/1.mdx` from #8584 * i18n(fr): Update `tutorial/4-layouts/2.mdx` from #8318 * i18n(fr): Update `tutorial/4-layouts/2.mdx` from #8543 * i18n(fr): Update `tutorial/5-astro-api/1.mdx` from #8191 * i18n(fr): Update `tutorial/5-astro-api/2.mdx` from #8327 * i18n(fr): Update `tutorial/5-astro-api/2.mdx` from #8489 * i18n(fr): Update `tutorial/5-astro-api/4.mdx` from #8419 * i18n(fr): Fix tab Signed-off-by: Thomas Bnt <[email protected]> --------- Signed-off-by: Thomas Bnt <[email protected]> Co-authored-by: Yan <[email protected]>
Description (required)
The relative path
const allPosts = await Astro.glob('./posts/*.md');
works as well asconst myPosts = await Astro.glob('../pages/posts/*.md');
, which is the original. The latter unnecessarily returns to the pages folder.Related issues & labels (optional)
felipeaprotazio