-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjson-ld.js
More file actions
89 lines (81 loc) · 2.78 KB
/
json-ld.js
File metadata and controls
89 lines (81 loc) · 2.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// JSON-LD structured data for SEO
// Mintlify automatically includes .js files on every page.
// This script injects JSON-LD structured data into the <head> for search engine rich results.
(function () {
var SITE_URL = "https://docs.agentcontrol.dev";
var REPO_URL = "https://github.com/agentcontrol/agent-control";
// -- Organization schema --
var organization = {
"@context": "https://schema.org",
"@type": "Organization",
name: "Agent Control",
url: SITE_URL,
logo: SITE_URL + "/logo/dark.svg",
sameAs: [REPO_URL],
description:
"Runtime guardrails for AI agents — configurable, extensible, and production-ready.",
};
// -- WebSite schema (enables sitelinks search box in Google) --
var website = {
"@context": "https://schema.org",
"@type": "WebSite",
name: "Agent Control Docs",
url: SITE_URL,
description:
"Documentation for Agent Control — policy-based runtime guardrails for AI agents.",
publisher: {
"@type": "Organization",
name: "Agent Control",
url: SITE_URL,
},
};
// -- SoftwareApplication schema (describes the product) --
var software = {
"@context": "https://schema.org",
"@type": "SoftwareApplication",
name: "Agent Control",
applicationCategory: "DeveloperApplication",
operatingSystem: "Cross-platform",
description:
"A policy-based control layer that sits between your AI agents and the outside world. Evaluates inputs and outputs against configurable rules to block harmful content, prompt injections, PII leakage, and other risks.",
url: SITE_URL,
downloadUrl: REPO_URL,
license: "https://opensource.org/licenses/MIT",
offers: {
"@type": "Offer",
price: "0",
priceCurrency: "USD",
},
isAccessibleForFree: true,
};
// -- TechArticle schema (per-page, uses page metadata) --
var title = document.title || "Agent Control Docs";
var description =
document.querySelector('meta[name="description"]')?.content || "";
var canonicalEl = document.querySelector('link[rel="canonical"]');
var pageUrl = canonicalEl ? canonicalEl.href : window.location.href;
var article = {
"@context": "https://schema.org",
"@type": "TechArticle",
headline: title,
description: description,
url: pageUrl,
publisher: {
"@type": "Organization",
name: "Agent Control",
url: SITE_URL,
},
mainEntityOfPage: {
"@type": "WebPage",
"@id": pageUrl,
},
};
// Inject all schemas into <head>
var schemas = [organization, website, software, article];
schemas.forEach(function (schema) {
var script = document.createElement("script");
script.type = "application/ld+json";
script.textContent = JSON.stringify(schema);
document.head.appendChild(script);
});
})();