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

Updated docs to reflect that getEntry returns undefined #10688

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hkbertoson
Copy link
Contributor

Description (required)

Updated Content Collections to reflect that getEntry returns undefined.
Feedback is greatly appreciated since I am still fairly new on writing documention.

Related issues & labels (optional)

  • Closes #
  • Suggested label:

@astrobot-houston
Copy link
Contributor

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

File Note
en/guides/content-collections.mdx Source changed, localizations will be marked as outdated.
en/reference/modules/astro-content.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.

Copy link

netlify bot commented Jan 10, 2025

Deploy Preview for astro-docs-2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit b0a0c0b
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/678158bc6cda930008720bd3
😎 Deploy Preview https://deploy-preview-10688--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@sarah11918
Copy link
Member

sarah11918 commented Jan 10, 2025

Thanks for identifying an issue and bringing it up @hkbertoson

I'll ask @ascorbic to weigh in here, because I really don't love that our "basic, here's what it looks like" example has error checks and even different ways to do things in it! I don't think the guide page is the place for this unless we absolutely expect all of that to be written every time someone renders content. @ascorbic , is that really the idea?

We could have a line or section that mentions you may want to consider error handling/checking for entries, with its own separate example. Or, this just links to the reference page where we add a section on how to do this.

But, this seems wrong as "Here's how you do this!" unless this really is "how we expect you to do it, every time, checking for whether things exist first." So I'll need Matt to let me know how he wants to guide people to use the feature! Hang tight Hunter until he gives his guidance! 🙌

@hkbertoson
Copy link
Contributor Author

Sure thing. Thanks! @sarah11918

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.

3 participants