PortalJS — Add Dataset
Overview
Register a dataset in a PortalJS (portaljs-catalog) portal. The skill appends one entry to
datasets.json — the single source of truth for the catalog — and routes the underlying
bytes by source first, then size: a local file defaults to R2 via Git LFS, a remote URL
defaults to passthrough (no copy). No per-dataset page is created; the catalog at /search
lists the new entry and the dynamic showcase route pages/[owner]/[slug].tsx renders it
automatically at /@<namespace>/<slug>. Supported formats for the showcase preview: CSV,
TSV, JSON (array), and GeoJSON.
Prerequisites
- A scaffolded PortalJS portal (see
portaljs-new-portal) withdatasets.json,
package.json, and pages/[owner]/[slug].tsx present.
- The source data: a local file path or a publicly reachable URL.
- For the R2/Git LFS default route:
gitandgit-lfsinstalled, and an Arc account token
(or an OSS Giftless key) to mint a push-scoped LFS credential.
- Node 18+ and npm available in the portal directory.
Instructions
The canonical, full step-by-step workflow is