Skip to content

Commit

Permalink
Update REAMDE.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mciszczon committed Nov 24, 2024
1 parent d3633c9 commit 1cb6105
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ Or use our favorite package manager.

## Usage

### Hive Blog Loader
In your Astro project, edit the `/src/content/config.ts` and define any collections using the loaders
that this package provides:

In your Astro project, edit the `/src/content/config.ts`:
### Hive Blog Loader

```ts
import { defineCollection } from "astro:content";
Expand All @@ -30,11 +31,22 @@ export const collections = {
blog: defineCollection({
type: "content_layer",
loader: hiveBlogLoader("hive.coding") // Selected username
}),
accounts: defineCollection({
type: "content_layer",
loader: hiveAccountsLoader("hive.coding") // or ["acc1", "acc2"] for multiple accounts
})
};
```

For now only `hiveBlogLoader` is available, more coming soon!
## Learn more

- [Astro](https://astro.build/)
- [Content Layer API](https://astro.build/blog/content-layer-deep-dive/)

## Support

If you have any questions or need help, please join our [Discord server](https://discord.gg/3u9v7b4w).

## Contributing

Expand Down

0 comments on commit 1cb6105

Please sign in to comment.