···11-# Astro Starter Kit: Component Package
22-33-This is a template for an Astro component library. Use this template for writing components to use in multiple projects or publish to NPM.
11+# Openring Loader
4255-```sh
66-pnpm create astro@latest -- --template component
77-```
33+A custom Astro content loader that combines multiple RSS/Atom feeds into a single collection. Mimics the behavior of [openring](https://git.sr.ht/~sircmpwn/openring) / [openring-rs](https://github.com/lukehsiao/openring-rs), a tool for generating webrings from RSS feeds.
8499-[](https://stackblitz.com/github/withastro/astro/tree/latest/examples/non-html-pages)
1010-[](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/non-html-pages)
1111-[](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/component/devcontainer.json)
55+## Example Usage
1261313-## ๐ Project Structure
1414-1515-Inside of your Astro project, you'll see the following folders and files:
1616-1717-```text
1818-/
1919-โโโ index.ts
2020-โโโ src
2121-โ โโโ MyComponent.astro
2222-โโโ tsconfig.json
2323-โโโ package.json
77+```astro
88+const openringCollection = defineCollection({
99+ loader: openringLoader({
1010+ feeds: [
1111+ "https://tangled.org/calebjasik.jasik.xyz/astro-openring/feed.atom",
1212+ "https://jasik.xyz/rss.xml",
1313+ ],
1414+ skipURLs: ["https://example.com/blog-post-with-weird-rss-feed-item"],
1515+ numArticles: 50, // Total number of articles to fetch
1616+ perSource: 5, // Number of articles to get from each feed
1717+ }),
1818+});
2419```
2525-2626-The `index.ts` file is the "entry point" for your package. Export your components in `index.ts` to make them importable from your package.
2727-2828-## ๐ง Commands
2929-3030-All commands are run from the root of the project, from a terminal:
3131-3232-| Command | Action |
3333-| :------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
3434-| `pnpm link` | Registers this package locally. Run `pnpm link my-component-library` in an Astro project to install your components |
3535-| `pnpm publish` | [Publishes](https://docs.npmjs.com/creating-and-publishing-unscoped-public-packages#publishing-unscoped-public-packages) this package to NPM. Requires you to be [logged in](https://docs.npmjs.com/cli/v8/commands/pnpm-adduser) |