惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

云风的 BLOG
云风的 BLOG
M
MIT News - Artificial intelligence
博客园 - Franky
J
Java Code Geeks
V
Visual Studio Blog
G
Google Developers Blog
罗磊的独立博客
MongoDB | Blog
MongoDB | Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Recent Announcements
Recent Announcements
Last Week in AI
Last Week in AI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow Blog
博客园 - 司徒正美
The GitHub Blog
The GitHub Blog
腾讯CDC
阮一峰的网络日志
阮一峰的网络日志
V
V2EX
博客园 - 【当耐特】
IT之家
IT之家
I
InfoQ
U
Unit 42
C
Check Point Blog
Martin Fowler
Martin Fowler

The Astro Blog

Astro 6.4 Astro 6.3 Starlight 0.39 Astro 6.2 What's new in Astro - April 2026 What's new in Astro - March 2026 Astro 6.1 CloudCannon Joins Astro as an Official CMS Partner Astro 6.0 What's new in Astro - February 2026 What's new in Astro - January 2026 Astro 5.17 Supporting the future of Astro The Astro Technology Company joins Cloudflare Astro 6 Beta What's new in Astro - December 2025 What's new in Astro - November 2025 Astro 5.16 Stainless Sponsors Astro, Launches Astro-Powered Docs Platform What's new in Astro - October 2025 Astro 5.15 Spirit of Astro: meet the winning designs What's new in Astro - September 2025 Astro 5.14 Cloudflare Donates $150,000 to Support Astro's Open Source Mission Webflow Donates $150,000 to Support Astro's Open Source Mission Mux: Our Official Video Partner Unleashing creativity: How CodeTV built a video streaming platform with Astro and Mux | Astro What's new in Astro - August 2025 Astro 5.13
Community Loaders for Astro Content Layer
Matthew Phillips · 2024-09-19 · via The Astro Blog

Since experimental support for the Astro Content Layer API was added we have seen several loaders being built for a variety of types of content. We’ve already highlighted a few of the CMSes that have built loaders. In this post, we’ll go over some of the other types of loaders to see the diverse use cases for the content layer.

The loaders we’ll be covering here are:

  • Notion
  • Stripe
  • Feed loader
  • Airtable
  • Strapi

Notion

Notion is a collaborative platform for all types of documents. Although it’s not usually thought of as a CMS, many people do use it as one.

With notion-astro-loader you can sync Notion documents into one of your project’s collections. The loader automatically infers a schema based on the schema of the Notion database.

Install notion-astro-loader and configure it like so:

import { defineCollection } from "astro:content";

import { notionLoader } from "notion-astro-loader";

const database = defineCollection({

loader: notionLoader({

auth: import.meta.env.NOTION_TOKEN,

database_id: import.meta.env.NOTION_DATABASE_ID,

filter: {

property: "Hidden",

checkbox: { equals: false },

},

}),

});

export const collections = { database };

Feed loader

The Astro feed loader allows you to load RSS, RDF, and Atom feeds, and use the data in your Astro site. There are many use cases for this, as RSS is a widely used publishing format. For example, you can use RSS to show recent releases for GitHub projects on your site.

To use the loader, install the @ascorbic/feed-loader package and define a collection pointing as a feed URL like so:

import { defineCollection } from "astro:content";

import { feedLoader } from "@ascorbic/feed-loader";

const releases = defineCollection({

loader: feedLoader({

url: "https://github.com/withastro/astro/releases.atom",

}),

})

const podcasts = defineCollection({

loader: feedLoader({

url: "https://feeds.99percentinvisible.org/99percentinvisible",

}),

})

export const collections = { releases, podcasts }

Stripe

With the Stripe loader you can pull down product and price information from the Stripe API.

To use it, you’ll need the stripe-astro-loader and stripe packages. Create an instance of Stripe with your API key, then pass it to the loaders, and that’s all you need to do.

import { defineCollection } from "astro:content";

import { stripePriceLoader, stripeProductLoader } from "stripe-astro-loader";

import Stripe from "stripe";

const stripe = new Stripe("<API_KEY>");

const products = defineCollection({

loader: stripeProductLoader(stripe),

})

const prices = defineCollection({

loader: stripePriceLoader(stripe),

})

export const collections = { products, prices }

Airtable

Airtable is a way to organize data and build no-code apps. With the Airtable loader you can load records from your Airtable base and use them in an Astro project.

The Airtable loader is available from the @ascorbic/airtable-loader package. Provide your API key from an environment variable and load a table with the loader.

import { defineCollection } from "astro:content";

import { airtableLoader } from "@ascorbic/airtable-loader";

const launches = defineCollection({

loader: airtableLoader({

base: import.meta.env.AIRTABLE_BASE,

table: "Product Launches",

}),

})

export const collections = { launches }

Strapi

Strapi is an open-source headless CMS that can be self-hosted or used with Strapi Cloud. With Strapi you can create collections and custom content types.

The new community developed Strapi loader lets you pull down your content into local collections. To use it, install strapi-community-astro-loader from npm. In your Content Collections config (src/content/config.ts) create a collection and call the loader with the contentType you are wanting to sync. In this example we’re grabbing all of the remote articles and syncing them into a collection called posts.

import { defineCollection } from "astro:content";

import { strapiLoader } from "strapi-community-astro-loader";

const posts = defineCollection({

loader: strapiLoader({

contentType: "article"

}),

})

export const collections = { posts }

Also see the Strapi blog article How To Create a Custom Astro Loader for Strapi Using Content Layer API.