Skip to content

Switch to getCollection from Astro.glob #3

@taoeffect

Description

@taoeffect

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions