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

docs: Content Layer API Example small fix #11814

Merged
merged 4 commits into from
Aug 27, 2024

Conversation

eduardocereto
Copy link
Contributor

Description

It's a small error in an example of content-collections on page

https://docs.astro.build/en/reference/configuration-reference/

I'm fixing it here because after diving into the docs repo it seems the data comes canonically from these comments.

---
import { getEntry, render } from 'astro:content';

const post = await getEntry('blog', Astro.params.slug);

- const { Content, headings } = await render(entry);
+ const { Content, headings } = await render(post); 
---

<Content />

Changes

A single comment string change to fix an example that uses the wrong variable.

Testing

None. Only changes to doc strings

Docs

We're fixing docs here, no docs needed.

small fix to example
Copy link

changeset-bot bot commented Aug 22, 2024

🦋 Changeset detected

Latest commit: 52911f2

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review labels Aug 22, 2024
@eduardocereto
Copy link
Contributor Author

eduardocereto commented Aug 22, 2024

We need to ping @withastro/maintainers-docs as instructed by Contrib guide after merged.

@eduardocereto eduardocereto changed the title Content Layer API Example small fix doc: Content Layer API Example small fix Aug 22, 2024
@eduardocereto eduardocereto changed the title doc: Content Layer API Example small fix docs: Content Layer API Example small fix Aug 22, 2024
Copy link
Member

@TheOtterlord TheOtterlord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

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.

Approving for docs, and updated branch hoping the tests pass this time!

@sarah11918
Copy link
Member

Note: added a changeset because this will correct a code example in config ref docs, and should be released as corrected documentation for the content layer API

@eduardocereto
Copy link
Contributor Author

eduardocereto commented Aug 26, 2024

I know this is a ridiculously small patch but it's my first one. So let me feel proud for a quick moment. :)

Thanks a lot for merging and for all the work you guys do. I love Astro and it has rekindled my interest in frontend work.

I'm looking forward to my next PR.

@ematipico ematipico merged commit 2bb72c6 into withastro:main Aug 27, 2024
13 of 14 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Aug 27, 2024
@ascorbic
Copy link
Contributor

@eduardocereto thanks for the fix! I made the same error in the release blog and did spot that in time, but missed this one entirely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants