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

Switch to getCollection from Astro.glob #3

Open
taoeffect opened this issue Oct 11, 2024 · 0 comments
Open

Switch to getCollection from Astro.glob #3

taoeffect opened this issue Oct 11, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@taoeffect
Copy link
Member

taoeffect commented Oct 11, 2024

Problem

For iterating through and rendering post contents, this repo uses Astro.glob instead of the recommended and new getCollection API.

The reason is that the Astro.glob API supports a really important API called compiledContent() on the entries returned. This API is important for rendering all .md and .mdx files to RSS, handling the <!--more--> comment, etc. See these links for more details:

Solution

See examples here:

We need to use getCollection everywhere, and make sure the RSS feed isn't broken.

@taoeffect taoeffect added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant