···11+---
22+"@nulfrost/leaflet-loader-astro": minor
33+---
44+55+Added the ability to use a handle or did when specifying a repo for leafletStaticLoader and leafletLiveLoader
66+77+88+```ts
99+import { defineLiveCollection} from "astro:content";
1010+import { leafletLiveLoader } from "leaflet-loader-astro";
1111+1212+const documents = defineLiveCollection({
1313+ loader: leafletLiveLoader({ repo: "dane.computer" }), // or repo: did:plc:qttsv4e7pu2jl3ilanfgc3zn, both work!
1414+});
1515+1616+export const collections = { documents };
1717+```
+12-5
lib/leaflet-live-loader.ts
···11-import { isDid } from "@atproto/did";
11+import { Client, simpleFetchHandler } from "@atcute/client";
22+import { isHandle } from "@atcute/lexicons/syntax";
23import type { LiveLoader } from "astro/loaders";
34import type {
45 CollectionFilter,
···1011import {
1112 getLeafletDocuments,
1213 getSingleLeafletDocument,
1414+ isPlcDid,
1315 leafletBlocksToHTML,
1416 leafletDocumentRecordToView,
1517 LiveLoaderError,
1618 resolveMiniDoc,
1719 uriToRkey,
1820} from "./utils.js";
1919-import { Client, simpleFetchHandler } from "@atcute/client";
20212122export function leafletLiveLoader(
2223 options: LiveLeafletLoaderOptions,
···3536 );
3637 }
37383838- // not a valid did
3939- if (!isDid(repo)) {
4040- throw new LiveLoaderError("invalid did", "INVALID_DID");
3939+ // not a valid handle, check if valid did
4040+ if (!isHandle(repo)) {
4141+ // not a valid handle or did, throw
4242+ if (!isPlcDid(repo)) {
4343+ throw new LiveLoaderError(
4444+ "invalid handle or did",
4545+ "INVALID_HANDLE_OR_DID",
4646+ );
4747+ }
4148 }
42494350 return {
+11-3
lib/leaftlet-static-loader.ts
···11import { Client, simpleFetchHandler } from "@atcute/client";
22+import { isHandle } from "@atcute/lexicons/syntax";
23import { isDid } from "@atproto/did";
34import type { Loader, LoaderContext } from "astro/loaders";
45import { LeafletDocumentSchema } from "schema.js";
···89} from "types.js";
910import {
1011 getLeafletDocuments,
1212+ isPlcDid,
1113 leafletBlocksToHTML,
1214 leafletDocumentRecordToView,
1315 LiveLoaderError,
···2729 );
2830 }
29313030- // not a valid did
3131- if (!isDid(repo)) {
3232- throw new LiveLoaderError("invalid did", "INVALID_DID");
3232+ // not a valid handle, check if valid did
3333+ if (!isHandle(repo)) {
3434+ // not a valid handle or did, throw
3535+ if (!isPlcDid(repo)) {
3636+ throw new LiveLoaderError(
3737+ "invalid handle or did",
3838+ "INVALID_HANDLE_OR_DID",
3939+ );
4040+ }
3341 }
34423543 return {