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

Shorter Relative Path #8191

Merged
merged 3 commits into from
Jun 14, 2024
Merged

Shorter Relative Path #8191

merged 3 commits into from
Jun 14, 2024

Conversation

felipeaprotazio
Copy link
Contributor

Description (required)

The relative path const allPosts = await Astro.glob('./posts/*.md'); works as well as const myPosts = await Astro.glob('../pages/posts/*.md');, which is the original. The latter unnecessarily returns to the pages folder.

Related issues & labels (optional)

  • Suggested label: code snippet update, good first issue, help leave feedback.

felipeaprotazio

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.
Copy link

vercel bot commented May 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs 🛑 Canceled (Inspect) Jun 14, 2024 7:13pm

@astrobot-houston
Copy link
Contributor

Hello! Thank you for opening your first PR to Astro’s Docs! 🎉

Here’s what will happen next:

  1. Our GitHub bots will run to check your changes.
    If they spot any broken links you will see some error messages on this PR.
    Don’t hesitate to ask any questions if you’re not sure what these mean!

  2. In a few minutes, you’ll be able to see a preview of your changes on Vercel 🥳

  3. One or more of our maintainers will take a look and may ask you to make changes.
    We try to be responsive, but don’t worry if this takes a few days.

@astrobot-houston
Copy link
Contributor

astrobot-houston commented May 6, 2024

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

Locale File Note
en tutorial/5-astro-api/1.mdx Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@sarah11918
Copy link
Member

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!

@sarah11918 sarah11918 added the code snippet update Updates a code sample: typo, outdated code etc. label May 21, 2024
Copy link
Member

@sarah11918 sarah11918 left a 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!

@sarah11918 sarah11918 merged commit 808688a into withastro:main Jun 14, 2024
7 of 8 checks passed
@vercel vercel bot temporarily deployed to Preview – docs June 14, 2024 19:13 Inactive
thomasbnt added a commit to thomasbnt/docs that referenced this pull request Jun 26, 2024
yanthomasdev added a commit that referenced this pull request Jun 26, 2024
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code snippet update Updates a code sample: typo, outdated code etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants