Skip to content

feat: seed /public/links.jsonld on first run - #13

Merged
melvincarvalho merged 1 commit into
gh-pagesfrom
feat-public-links
May 16, 2026
Merged

melvincarvalho merged 1 commit into
gh-pagesfrom
feat-public-links

Conversation

@melvincarvalho

Copy link
Copy Markdown
Contributor

Summary

After sign-in the new `/public/` tile on the welcome page used to land users on an essentially-empty container (just the LDP listing of `.acl`). This seeds a small JSON-LD doc with outbound links — Pilot, more Solid apps, the jspod source, JSS source — so the tile lands on something useful instead.

Behavior

  • On every startup, after `waitForReady` resolves, jspod copies its bundled `links.jsonld` to `pod-data/public/links.jsonld`.
  • Skip if exists — user customizations survive.
  • File is publicly-readable thanks to JSS's default `/public/.acl`.
  • The data browser renders the file as a cream-card with each URI as a clickable link (the same renderer that handles everything else).

Test plan

  • Local: file written to `pod-data/public/links.jsonld` (918 bytes)
  • Local: `curl http://localhost:5444/public/links.jsonld\` returns HTTP 200 unauth (public read inherits)
  • Local: HTML wrapper served for `Accept: text/html` includes the data island
  • User verified rendering in browser

Note on the version bump

While testing, I caught (and added a memory rule about) the pre-publish version-bump footgun: bumping `package.json` ahead of `npm publish` makes `pkg.version` reference a non-existent jsdelivr URL, so the data browser fails to load and the page renders blank. Version is now bumped right before publishing, not as PR prep.

Bumps jspod to 0.0.15.

Refs #1

After sign-in, the new /public/ tile on the welcome page used to land
the user on an empty container (just an LDP listing of the .acl file).
This adds a small JSON-LD doc with a couple of useful outbound links —
Pilot (Solid app to use) and a directory of more Solid apps — plus
the jspod / JSS source repos.

Skip-if-exists, so user customizations to /public/links.jsonld
survive jspod restarts. Lives alongside the existing welcome.html
overwrite logic; both fire after waitForReady resolves.

The data browser renders the file as a cream-card with each URI as
a clickable link — the page is the data, the data is the navigation.

Bumps jspod to 0.0.15.

Refs #1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant