The application can display external icon metadata from selfh.st/icons using the external_icons PocketBase collection. This allows using icons hosted on jsDelivr without local storage.
Prerequisites
If the collection does not exist, import data/sources/selfhst/external_icons.collection.json in the PocketBase admin UI under Collections before running the importer. This JSON defines the fields, public rules (listRule: "", viewRule: ""), and the (source, slug) unique index.
Import Process
- Download the required metadata files:
mkdir -p data/sources/selfhst
curl -fsSL https://raw.githubusercontent.com/selfhst/icons/main/index.json -o data/sources/selfhst/index.json
curl -fsSL https://raw.githubusercontent.com/selfhst/icons/main/index-consolidated.json -o data/sources/selfhst/index-consolidated.json
curl -fsSL https://raw.githubusercontent.com/selfhst/icons/main/tags.json -o data/sources/selfhst/tags.json
- Run the import script:
PB_ADMIN=admin@example.com PB_ADMIN_PASS=your-password \
NEXT_PUBLIC_POCKETBASE_URL=http://127.0.0.1:8090 \
bun run scripts/import-selfhst.ts
Icon URL Pattern
External icons are served via jsDelivr using the following pattern:
https://cdn.jsdelivr.net/gh/selfhst/icons/<format>/<slug>.<format>
Note: Every external icon card and detail page must display Icons by selfh.st/icons (CC BY 4.0).
mkdir -p data/sources/selfhst
curl -fsSL https://raw.githubusercontent.com/selfhst/icons/main/index.json -o data/sources/selfhst/index.json
curl -fsSL https://raw.githubusercontent.com/selfhst/icons/main/index-consolidated.json -o data/sources/selfhst/index-consolidated.json
curl -fsSL https://raw.githubusercontent.com/selfhst/icons/main/tags.json -o data/sources/selfhst/tags.json
PB_ADMIN=admin@example.com PB_ADMIN_PASS=your-password \
NEXT_PUBLIC_POCKETBASE_URL=http://127.0.0.1:8090 \
bun run scripts/import-selfhst.ts