Skip to content

Conversation

@BigBlueHat
Copy link
Member

@BigBlueHat BigBlueHat commented Dec 5, 2025

  • Describe the JSON-LD homepage in the main example.

Fixes #880 by avoiding the problem altogether.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 5, 2025

Deploying json-ld-org with  Cloudflare Pages  Cloudflare Pages

Latest commit: d9d00e4
Status: ✅  Deploy successful!
Preview URL: https://32cd375a.json-ld-org.pages.dev
Branch Preview URL: https://update-homepage-example.json-ld-org.pages.dev

View logs

@BigBlueHat BigBlueHat requested a review from davidlehn December 5, 2025 15:34
@BigBlueHat BigBlueHat changed the base branch from main to fomantic-homepage December 5, 2025 15:35
@BigBlueHat BigBlueHat force-pushed the update-homepage-example branch from 80c2631 to 00762ad Compare December 5, 2025 17:10
@mscuthbert
Copy link

It does fix the problem from #889 - but I don't know if this is the best direction for the project. With the Lennon example I knew exactly something I could do with json-ld -- "ah, it's a way of representing metadata and linked data about people...and probably other things...in JSON! Cool"

When I see a site that describes its own website...I wouldn't think that this is the proper library for ''my'' purposes -- it brings out a lot the meta in metadata.

Why not describe an animal instead? Common-name, species, etc. Egg-laying:boolean? As an added bonus it immediately becomes a symbol of the project! (asked ChatGPT for common animals not already closely associated with particular tech projects and Otter, Swan, and Barn Owl came up ... along with more specific things like Tanuki (Racoon dog -- my fav), Agouti,Opah ("bonus: natural circle-logo shape"), etc.

@BigBlueHat
Copy link
Member Author

BigBlueHat commented Dec 5, 2025

@mscuthbert I take your point, for sure. The animal idea is fun. 🐱 However, we'd need a different context (or we could define one, as we'd done for Person back in the day)--schema.org doesn't have an Animal class (yet...).

What if we went back to your example in #889, but added both spouses? I can drop the "A Simple Example" header (which is redundant anyhow) which should buy us a bit more space.

I'll work that up on this PR (as the foundational file has changed considerable since you made #889...sorry about that 😉), and then you (and hopefully others!) can let me know what you/y'all think.

@mscuthbert
Copy link

What if we...added both spouses?

Sure! It makes it a great example of how JSON and thus JSON-LD can represent not just simple key-values but also ordered arrays/lists of values -- a win, win!

And as soon as I made the animal suggestion I was like: no...what grabbed me about JSON-LD was that I instantly saw that it was a key to implementing Dublin-Core or other human-creator w/ creation linked-metadata in a supported fashion, and an animal taxonomy example makes it look more like Wikidata-in-JSON!

@davidlehn
Copy link
Member

  • That "now" thing isn't needed in the update.
  • Does this make things better or worse? Someone unfamiliar with intricacies of JSON-LD might ask if those spouse values are concurrent or ordered, and if ordered, why are they reversed. All this can be explained, and may open a discussion about data modeling, but I'd think the main front page example should avoid any of that.
  • I'll again suggest we use something without complexities. If birthPlace was added to that context, it would be simple enough.

Also fix `active` class on Specifications dropdown (which caused the
whole dropdown list to appear stuck open over the page...).
The `bs2.liquid` file is not currently used. Keeping it on hand in case
some old page surfaces that we need to deal with.
Liquid `contains` does (unfortunate...) double duty for both string
and array matching and provides no way to create an array-only comparison
based on exact equivalence. Consequently...this is the result.
@BigBlueHat
Copy link
Member Author

That "now" thing isn't needed in the update.

Sorry, yeah. That's a left over from the WebPage example. I'll clean it out.

Does this make things better or worse? Someone unfamiliar with intricacies of JSON-LD might ask if those spouse values are concurrent or ordered, and if ordered, why are they reversed. All this can be explained, and may open a discussion about data modeling, but I'd think the main front page example should avoid any of that.

Great questions! I think it makes things better by piquing interest. That said, some additional content on the site (or the resurrection of the Primer and certainly more examples) may be in order, but I see the generation of more questions/curiosities as a great thing. 😁

I'll again suggest we use something without complexities. If birthPlace was added to that context, it would be simple enough.

"Complexities" being the multiple spouses? Given the value just expressed of "piquing interest" (especially given @mscuthbert's feedback), I rather like the way this opens up curiosities.

@mscuthbert fwiw, JSON-LD does not treat arrays as "ordered" (vs. JSON) because underneath this shakes out to discrete statements of...

<http://dbpedia.org/resource/John_Lennon> <http://schema.org/birthDate> "1940-10-09"^^<http://www.w3.org/2001/XMLSchema#date> .
<http://dbpedia.org/resource/John_Lennon> <http://schema.org/spouse> <http://dbpedia.org/resource/Cynthia_Lennon> .
<http://dbpedia.org/resource/John_Lennon> <http://schema.org/spouse> <http://dbpedia.org/resource/Yoko_Ono> .
<http://dbpedia.org/resource/John_Lennon> <http://xmlns.com/foaf/0.1/name> "John Lennon" .

...which doesn't include any implicit ordering. JSON-LD does (of course) allow someone to layer that back in, but this example wouldn't do that, but other pages/info could.

You can read more about that in https://www.w3.org/TR/json-ld11/#sets-and-lists

At any rate, I'm in favor of this wee bit of "complexity" to help promote inquiry.

@BigBlueHat BigBlueHat requested a review from TallTed December 8, 2025 16:14
@BigBlueHat BigBlueHat force-pushed the update-homepage-example branch from 6a121e9 to d9d00e4 Compare December 8, 2025 16:15
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.

4 participants