blurry icon indicating copy to clipboard operation
blurry copied to clipboard

Support for @Id

Open KajKandler opened this issue 2 years ago • 3 comments

In Schema markup, there is an important attribute (if not the most important one), to support @Id for entities.

In webpages, mostly the @Id attribute is set to the URL (i.e. "https://example.com/about-us/") or URL derived from the web page's URL, such as "https://example.com/#organization"

I tried to set value in the front matter to {url}, which did not work. Is there a way that is not obvious? If so it would be great to document it.

KajKandler avatar Nov 14 '23 14:11 KajKandler

P.S.: @Id is a very important attribute, so one can assemble schema from different pieces and amend schema defined in the header also in the body (affording the power of templating)

KajKandler avatar Nov 14 '23 14:11 KajKandler

Interesting! I didn't know about that feature, so I've been reading more here: https://schema.org/docs/datamodel.html#identifierBg

I'll add this to the next release

johnfraney avatar Nov 15 '23 12:11 johnfraney

An implementation note:

  • the URIs used as IDs are supposed to be http:// not https://
  • technically it is possible to use https, but the norm is http
  • that implies if one can utilize the url or base url as part of the value it should allow exchange of the scheme

See url_for in Flask framework for how this is supported there.

KajKandler avatar Nov 16 '23 19:11 KajKandler