frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

JSON-LD Explained for Personal Websites

https://hawksley.dev/blog/json-ld-explained-for-personal-websites/
58•ethanhawksley•1h ago

Comments

mananaysiempre•1h ago
A bit disappointing that (IIUC) for the common parsers you have to say everything twice, in HTML and in the accompanying JSON-LD form even though RDFa exists for the exact purpose of letting you point at the values already present in your markup. (Admittedly RDFa is perhaps too flexible for its own good when you just want to mark up some stuff, but if you’re writing a full parser anyway dealing with a bit of excessive cleverness in the format should not be too bad.)
panzi•42m ago
And then there is https://schema.org/ It's the item* attributes, e.g.: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/... Also Dublin Core in <meta> tags. Why do they keep adding conflicting meta data formats to HTML!?!
9dev•37m ago
https://xkcd.com/927/
captn3m0•27m ago
There is also microformats.
klodolph•18m ago
I think if you are using Dublin Core, it’s because you’re a library. Maybe I am off the mark, but that is the sense I get from this—not all these standards should be used for all pages on the web.

I think you should just think about what metadata you actually care about, and the main metadata I care about (choose your own list) is authorship, publish date, last update, subject keywords, thumbnail (OpenGraph 1200x630), and summary.

There’s a long list of additional metadata that I could put in my webpages because there are standardized ways to do it, but, why bother?

jauco•5m ago
To be fair schema.org and dublin core say “when a property is name ‘title’ it means …” and you can expect to find the following properties…

Json-ld says: if you want to know whether the “title” property means the schema.org or the dublin core variant then you can find out which it is by <json-ld algorithm>

So you’d always use json-ld _with_ schema.org or something.

alwillis•4m ago
They don't conflict; they were designed to work together. You can have schema.org (in JSON-LD, RDFa, or micro data) on the same page as Dublin Core, etc.

For example, there's no explicit property in schema's Person type [1] for a nickname. But the FOAF standard does [2].

Just add FOAF to the JSON-LD context:

    {
      "@context": {
        "@vocab": "https://schema.org/",
        "foaf": "http://xmlns.com/foaf/0.1/",
        "pronouns": "https://schema.org/pronouns" 
    }


You now use the FOAF nickname property:

    "@type": "Person",
      "givenName": "Timothy",
      "familyName": "Berners-Lee",
      "foaf:nick": "TBL",
[1]: https://schema.org/Person

[2]: https://xmlns.com/foaf/spec/#term_nick

klodolph•26m ago
IMO this is going overboard. Any time you are duplicating data from HTML into JSON-LD, consider just omitting that data from JSON-LD, unless the data isn’t consistently present in HTML (because it is a bitch to be consistent about this stuff).

I tried using RDFa and liked the property that it was theoretically less redundant, but switched to JSON-LD because it JSON-LD is just easier to get working. And this is speaking as somebody who uses a hand-rolled static site generator—the issue here is that whether information is present in the raw HTML is something contextual, and if something isn’t present in the HTML then you need to put it somewhere else or it’s not mechanically parseable from the page. Like, to a human reader, a post on “Alice’s Blog” is assumed to be authored by Alice, so I may omit the “by Alice” text from the document, and then I would want to put that metadata in the page some other way.

Putting the metadata in JSON-LD lets me just be dumb about it. The metadata is always in JSON-LD, and the HTML may or may not contain an explicit representation of that same metadata. Easy.

But the JSON-LD does not need to contain the URL of the page (which is <link rel=canonical>) or the title (which is in <title>), for example.

lenkite•52m ago
We have semantic HTML, but for some weird reason we need to yet again re-express the semantic meaning of our website in bespoke weird JSON in a script tag that the browser won't process.
klodolph•34m ago
I have used JSON-LD in my own websites and found that it fills a separate need from semantic HTML. Your semantic HTML will specify things that the browser processes, like the title and headings. The JSON-LD data is metadata, like date created, date updated, tags, authorship. These things can be expressed in the HTML using micro data, but I stopped using micro data because JSON-LD was easier.

The JSON-LD I populate from the same data that I use to generate my site, and I use the JSON-LD metadata to generate things like index pages (list of blog posts from 2024, all posts related to topic X, etc). The main consumers of JSON-LD are search engines.

If you are interested in getting offended, then think about how we are also putting OpenGraph metadata in our web pages. Two different metadata formats for the same page.

tommica•10m ago
Structured data exists yo pass the metadata. Issue with it is that of might impact the way your html needs to be structured, this can be messy.
rglullis•28m ago
What I see as the ideal would be a world where servers and browsers could do content negotitation, and have browsers attempting first to request only the json-ld from the website and using its own internal renderer format.
skylurk•32m ago
Not to be confused with line-delimited JSON
tommica•8m ago
Super useful article, wish that had existed in my seo days.

I had misunderstood the type field, because to me I was often just linking to a webpage, even if it is for a saas, the marketing page is still a webpage.

klodolph•4m ago
I would encourage people who have the pragmatic bent to read about JSON-LD from the Google documentation for web sites;

https://developers.google.com/search/docs/appearance/structu...

You’ll also notice that a lot of the information is relevant to only a small subset of sites. Rotten Tomatoes can publish the critic rating for movies using JSON-LD, but that’s not relevant for me (even if I write a review for a movie).

JSON-LD is nice because it’s easy and it is actually used by search engines. Yes, it can duplicate information in the web page itself, but I think the dream of perfectly annotating information so it only appears exactly once in your document is, well, a dream of spherical cows and massless ropes. It takes human effort to make a webpage and I am ok with a little duplication in the final product. My <h1> duplicates information in <title> anyway.

The AI Conundrum: We are living in highly subsidized, interesting times

1•pyeri•5m ago•0 comments

Japan chipmaking equipment suppliers report 10% drop in China sales

https://asiaai.fyi/japans-ai-shift-chip-woes-automation-hopes-cloud-expansion/
2•dweisinger•6m ago•1 comments

Nintendo Wii U games running from a 1980's Bernoulli disk [video]

https://www.youtube.com/watch?v=8GZDOpV2OXk
2•zdw•10m ago•0 comments

Ask for no, don't ask for yes (2022)

https://www.mooreds.com/wordpress/archives/3518
4•skogstokig•11m ago•0 comments

You're probably paying GPT prices for tasks that don't need GPT

https://ourtoken.ai/
2•AislinnYang•12m ago•0 comments

AI Is Taking Over Hospitals

https://www.theatlantic.com/health/2026/06/ai-healthcare-uber-moment/687567/
3•karakoram•14m ago•1 comments

I am dreading our LLM-written incident report future

https://surfingcomplexity.blog/2026/06/19/i-am-dreading-our-llm-written-incident-report-future/
2•_____k•15m ago•0 comments

Read More Fiction

https://pilk.website/5/read-more-fiction
2•npilk•17m ago•0 comments

The No Hallucination Guarantee

https://www.hudson-labs.com/blog/no-hallucination-guarantee
2•Anon84•19m ago•0 comments

We Taught a $3 Chip to Run CSS

https://geastack.com/blog-we-taught-a-chip-to-run-css
3•arbayi•22m ago•1 comments

Show HN: Tot – instant share links for HTML and Markdown files

https://github.com/plannotator/tot
3•ramoz•23m ago•0 comments

Ask HN: How should I convert Microsoft Word documents to Markdown?

2•lkrubner•24m ago•3 comments

Ask HN: What's Your Agents.md?

2•CSMastermind•26m ago•1 comments

Gumption Traps

https://en.wikipedia.org/wiki/Zen_and_the_Art_of_Motorcycle_Maintenance
2•toomuchtodo•27m ago•1 comments

More than 12.5M barrels of oil passed through Strait of Hormuz after deal signed [video]

https://www.youtube.com/watch?v=3_EQnkYc60U
2•Bender•29m ago•0 comments

Snowboard Kids 2 is Recompiled

https://blog.chrislewis.au/snowboard-kids-2-is-recompiled/
3•knackers•30m ago•0 comments

Quality in the Age of Slop

https://sinclairtarget.com/blog/2026/06/01/quality-in-the-age-of-slop/
2•weebst•31m ago•0 comments

Show HN: DebugBrief – turn debugging sessions into reports, no AI

https://github.com/harihkk/Debug-Brief
3•itshkrishna•31m ago•0 comments

Partial Application

https://en.wikipedia.org/wiki/Partial_application
2•tosh•32m ago•0 comments

False Balance

https://en.wikipedia.org/wiki/False_balance
2•chistev•35m ago•0 comments

KiCad-captouch: Capacitive touch interface generation

https://github.com/unwndevices/kicad-captouch
2•peteforde•36m ago•0 comments

The Path of Madness

https://brandur.org/nanoglyphs/029-path-of-madness
2•jordanscales•36m ago•0 comments

The Science That Turned Lizard Venom into GLP-1s Is Under Attack

https://www.nytimes.com/2026/06/20/opinion/glp1-research-science-funding.html
4•rmason•40m ago•1 comments

SHOW HN: I built a social profile for vibecoders to share & store their projects

https://kritive.com
2•sonOfHades•44m ago•1 comments

CMS Trap (2013)

https://max.engineer/cms-trap
1•tosh•45m ago•0 comments

Fastest Commodore PET Using the MCL65(2025)

https://hackaday.io/project/204693-worlds-fastest-commodore-pet-using-the-mcl65
1•rolph•47m ago•0 comments

JustHTML 3.0.0: A new HTML5 parser architecture

https://friendlybit.com/python/justhtml-3-parser-architecture/
1•EmilStenstrom•48m ago•0 comments

Thinking at the Edge

https://mklyons.com/blog/thinking-at-the-edge
1•mklyons•48m ago•0 comments

Graphene experts are trying to close reproducibility gap in 2D materials

https://cen.acs.org/materials/2-d-materials/graphene-2D-materials-reproducibility-industry/104/we...
3•EvgeniyZh•50m ago•0 comments

Founding Systems Engineer, hardtech startup, full time, ONSITE SF/hybrid

https://docs.google.com/document/d/1pudvLsPYiVOAItGD5lDM7zSJhSXqg2qRYWVOdyVp2wc/edit?usp=sharing
1•PapillonStar•51m ago•1 comments