Skip to content

Comments

build index#114

Merged
BigBlueHat merged 13 commits intomainfrom
build-index
Jan 30, 2026
Merged

build index#114
BigBlueHat merged 13 commits intomainfrom
build-index

Conversation

@BigBlueHat
Copy link
Contributor

@BigBlueHat BigBlueHat commented Nov 25, 2025

  • Export examples for use in other projects.
  • Use build instead of publish; add watch.
  • Add credentials/index.json for remote listing.

Test the above at https://build-index.vc-examples.pages.dev/credentials/index.json

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 25, 2025

Deploying vc-examples with  Cloudflare Pages  Cloudflare Pages

Latest commit: bc014e8
Status:🚫  Build failed.

View logs

@BigBlueHat
Copy link
Contributor Author

The build on Cloudflare is breaking because this also switches from npm run publish (which conflicts with npm publish) to npm run build.

@davidlehn
Copy link
Contributor

  • This process seems a bit strange. Why generate JSON with a template? Wouldn't it be easier to make what you want directly in the js file? Then the template would be a one liner {{ examples | json }}? (maybe with some pretty indentation mode)
  • I assume this is being exposed as consumable data so other UIs can more dynamically read it. Great! (Had been my wish to see that since this repo began!)
  • I think the data should be a bit more self describing. Obviously it should be in JSON-LD. :-) If that's a step too far at the moment, then at least put in some type and/or version marker in there so future tools can more easily tell what they are dealing with as this evolves.
  • I hope all the examples all grow a index.json or meta.json or similar and that gets pulled in here too. Credential name, description, vcdm version, tags, etc.

@BigBlueHat
Copy link
Contributor Author

  • This process seems a bit strange. Why generate JSON with a template? Wouldn't it be easier to make what you want directly in the js file? Then the template would be a one liner {{ examples | json }}? (maybe with some pretty indentation mode)

Agreed. I was just in that mode so did it there...but this could definitely be consolidated and code reduced across the various things (lib/index.js, src/_data/examples.js, and this Liquid template). I'll clean it up. Thanks.

  • I assume this is being exposed as consumable data so other UIs can more dynamically read it. Great! (Had been my wish to see that since this repo began!)

Yep! It's first use is in digitalbazaar/vc-viewer#10

  • I think the data should be a bit more self describing. Obviously it should be in JSON-LD. :-) If that's a step too far at the moment, then at least put in some type and/or version marker in there so future tools can more easily tell what they are dealing with as this evolves.

Decidedly! 😁 Happy to take it that way (and a bit embarrassed that I didn't in the first place 😝).

  • I hope all the examples all grow a index.json or meta.json or similar and that gets pulled in here too. Credential name, description, vcdm version, tags, etc.

Great idea. Some of that's started happening in the docs/ area, but that could go much further for sure. That would likely be a separate PR/effort, but let's see how this goes.

Thanks for the feedback!

@BigBlueHat
Copy link
Contributor Author

  • This process seems a bit strange. Why generate JSON with a template? Wouldn't it be easier to make what you want directly in the js file? Then the template would be a one liner {{ examples | json }}? (maybe with some pretty indentation mode)
  • I assume this is being exposed as consumable data so other UIs can more dynamically read it. Great! (Had been my wish to see that since this repo began!)
  • I think the data should be a bit more self describing. Obviously it should be in JSON-LD. :-) If that's a step too far at the moment, then at least put in some type and/or version marker in there so future tools can more easily tell what they are dealing with as this evolves.

These should all be addressed now.

  • I hope all the examples all grow a index.json or meta.json or similar and that gets pulled in here too. Credential name, description, vcdm version, tags, etc.

This one is now an issue: #120

@BigBlueHat BigBlueHat force-pushed the build-index branch 3 times, most recently from f08acab to 76d6fd9 Compare January 29, 2026 21:30
@BigBlueHat
Copy link
Contributor Author

@davidlehn the Cloudflare build is failing here (though not via the new npm run deploy command) because this PR changes the build command from npm run publish (which was conflicting with Node stuff) to npm run build...but if I change it in the Settings section on Cloudflare, I'll break all the other PRs... The wrangler.toml was meant to fix that...but clearly doesn't completely override the Dashboard's Settings settings... 😖

Anyhow. It works...despite the "evidence"...

Copy link
Contributor

@davidlehn davidlehn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how to test this. It's fine once various tools are synced on using the changes.

Also fix `repository.url` in package.json.
Useful for projects that want to use the list of VC Examples in their own UX/tooling.
The inline context mosly uses Linked Data Platform terms, so in theory,
this endpoint would be compatible with that ecosystem assuming it was
turned into RDF and added to a graph for use.
NODE_ENV MUST be set to `production` in production.
Also unignore `package-lock.json`.
@BigBlueHat BigBlueHat merged commit bffb3d9 into main Jan 30, 2026
2 of 4 checks passed
@BigBlueHat BigBlueHat deleted the build-index branch January 30, 2026 15:16
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.

2 participants