Skip to content

instytutfi/hive-astro-loader

Repository files navigation

NPM Version codecov GitHub Issues or Pull Requests Follow on Hive GitHub License

Hive Astro Loader

Astro Content Layer loader for the Hive blockchain

Installation

npm install @onhive.io/astro-loader

Or use our favorite package manager.

Usage

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

Hive Blog Loader

import { defineCollection } from "astro:content";
import { hiveBlogLoader, hiveAccountsLoader } from "@onhive.io/astro-loader";

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
  })
};

Learn more

Support

If you have any questions or need help, please join our Discord server.

Contributing

See CONTRIBUTING.md for more information.

License

This project is licensed under the MIT License. See the LICENSE file for more information.