- Issue created by @DamienMcKenna
- Status changed to Postponed: needs info
12 months ago 4:24pm 7 December 2023 - πΊπΈUnited States jrockowitz Brooklyn, NY
I am not completely understanding this question. Can you provide more information, possibly with some examples of JSON-LD?
- Status changed to Active
12 months ago 4:34pm 7 December 2023 - πΊπΈUnited States DamienMcKenna NH, USA
Forgot to finish my train of thought.
- πΊπΈUnited States jrockowitz Brooklyn, NY
I think you might be able to do this via custom JSON-LD.
- πΊπΈUnited States DamienMcKenna NH, USA
I ended up adding this to "Default Schema.org type custom JSON-LD":
node--CreativeWork: | { "mainEntityOfPage": { "@type": "WebPage", "@id": "[node:url:absolute]" } }
Per the other issue, I don't know why it needed to use the node--CreativeWork structure, but that made it work.
- πΊπΈUnited States jrockowitz Brooklyn, NY
I have to admit there is not set rule for when entity_type_id--bundle and entity_type_id--SchemaType is supported.
The main reason that only entity_type_id--SchemaType for custom JSON-LD is we can support inheritance. Your example from #5 using node--CreativeWork means all sub-types of CreativeWork will leverage the custom JSON-LD.
- πΊπΈUnited States DamienMcKenna NH, USA
I moved the configuration and moved the definitions to the "Custom JSON+LD" section of the Schema tab of the content type, and it's all working as expected now.
I still think there should be a way of controlling the output formatting, maybe a way of creating custom formatters for fields and to be able to select which formatter a specific field uses. So if you set a property to output an entity's URL it would give options to output as a simple string with the relative URL, a simple string with the absolute URL, a WebPage object with the @id set to the absolute URL, etc.
- πΊπΈUnited States jrockowitz Brooklyn, NY
There are a lot of hooks available to alter the JSON-lD.
@see https://git.drupalcode.org/project/schemadotorg/-/blob/1.0.x/modules/sch...Also, support for custom JSON-LD via tokens could/should allow people to change the value's format.
- Status changed to Fixed
8 months ago 1:59pm 16 March 2024 - πΊπΈUnited States jrockowitz Brooklyn, NY
@DamienMcKenna WebPage is now fully supported via β¨ Schema.org Blueprints: WebPage Fixed .
The Schema.org Blueprint Webpage module allows you to wrap any Schema.org Type via a node with https://schema.org/WebPage and WebPage related properties including https://schema.org/relatedLink and https://schema.org/significantLink.
Automatically closed - issue fixed for 2 weeks with no activity.