From 212e62c0f80457b8bc753f7e3b28a21a60c35192 Mon Sep 17 00:00:00 2001 From: Ricardo Date: Tue, 3 Mar 2026 18:01:42 +0100 Subject: [PATCH] feat: add AI usage metadata to JSON-LD structured data Add usageInfo (link to /ai transparency page) and creativeWorkStatus (human-readable AI disclosure) to the Article JSON-LD when AI metadata properties are present. Valid Schema.org, no impact on ActivityPub. Confab-Link: http://localhost:8080/sessions/83d68915-7921-4cc4-a838-c331fd1c4d6e --- _includes/layouts/post.njk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_includes/layouts/post.njk b/_includes/layouts/post.njk index a23bb0e..36492f9 100644 --- a/_includes/layouts/post.njk +++ b/_includes/layouts/post.njk @@ -238,7 +238,9 @@ withBlogSidebar: true } }, "description": {{ postDesc | dump | safe }}{% if postImage and postImage != "" and (postImage | length) > 10 %}, - "image": ["{% if postImage.startsWith('http') %}{{ postImage }}{% elif '/' in postImage and postImage[0] == '/' %}{{ site.url }}{{ postImage }}{% else %}{{ site.url }}/{{ postImage }}{% endif %}"]{% endif %} + "image": ["{% if postImage.startsWith('http') %}{{ postImage }}{% elif '/' in postImage and postImage[0] == '/' %}{{ site.url }}{{ postImage }}{% else %}{{ site.url }}/{{ postImage }}{% endif %}"]{% endif %}{% if aiTextLevel or aiCodeLevel or aiTools %}, + "usageInfo": "{{ site.url }}/ai"{% set _aiParts = [] %}{% if aiTextLevel %}{% set _textLabel %}{% if aiTextLevel === "0" %}None{% elif aiTextLevel === "1" %}Editorial assistance{% elif aiTextLevel === "2" %}Co-drafting{% elif aiTextLevel === "3" %}AI-generated{% endif %}{% endset %}{% set _aiParts = (_aiParts.push("Text: " + _textLabel), _aiParts) %}{% endif %}{% if aiCodeLevel %}{% set _codeLabel %}{% if aiCodeLevel === "0" %}Human-written{% elif aiCodeLevel === "1" %}AI-assisted{% elif aiCodeLevel === "2" %}AI-generated{% endif %}{% endset %}{% set _aiParts = (_aiParts.push("Code: " + _codeLabel), _aiParts) %}{% endif %}{% if aiTools %}{% set _aiParts = (_aiParts.push("Tools: " + aiTools), _aiParts) %}{% endif %}, + "creativeWorkStatus": "{{ _aiParts | join(', ') }}"{% endif %} }