Skip to content

Commit b5d965f

Browse files
committed
Link response headers for agents
Per the Cloudflare AI readiness evaluation: https://isitagentready.com/bitcoin.design?profile=content It took the search.json file that indexes the site content as an API catalog to serve to robots. Let's try this out. My suspicions is that the file may be too big to be ingested easily.
1 parent 4488888 commit b5d965f

3 files changed

Lines changed: 50 additions & 0 deletions

File tree

.well-known/api-catalog

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"linkset": [
3+
{
4+
"anchor": "https://bitcoin.design/.well-known/api-catalog",
5+
"item": [
6+
{
7+
"href": "https://bitcoin.design/search-data.json",
8+
"type": "application/json"
9+
}
10+
],
11+
"service-doc": [
12+
{
13+
"href": "https://bitcoin.design/guide/",
14+
"type": "text/html"
15+
}
16+
],
17+
"describedby": [
18+
{
19+
"href": "https://bitcoin.design/search-data.json",
20+
"type": "application/json"
21+
}
22+
]
23+
}
24+
]
25+
}

.well-known/service-desc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "Bitcoin Design website service descriptor",
3+
"description": "Discovery metadata for machine clients.",
4+
"homepage": "https://bitcoin.design/",
5+
"resources": {
6+
"apiCatalog": "https://bitcoin.design/.well-known/api-catalog",
7+
"serviceDoc": "https://bitcoin.design/guide/",
8+
"describedBy": "https://bitcoin.design/search-data.json"
9+
}
10+
}

netlify.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,18 @@
22
for = "/.well-known/nostr.json"
33
[headers.values]
44
Access-Control-Allow-Origin = "*"
5+
6+
[[headers]]
7+
for = "/"
8+
[headers.values]
9+
Link = "</.well-known/api-catalog>; rel=\"api-catalog\", </.well-known/service-desc.json>; rel=\"service-desc\"; type=\"application/json\", </guide/>; rel=\"service-doc\"; type=\"text/html\", </search-data.json>; rel=\"describedby\"; type=\"application/json\""
10+
11+
[[headers]]
12+
for = "/index.html"
13+
[headers.values]
14+
Link = "</.well-known/api-catalog>; rel=\"api-catalog\", </.well-known/service-desc.json>; rel=\"service-desc\"; type=\"application/json\", </guide/>; rel=\"service-doc\"; type=\"text/html\", </search-data.json>; rel=\"describedby\"; type=\"application/json\""
15+
16+
[[headers]]
17+
for = "/.well-known/api-catalog"
18+
[headers.values]
19+
Content-Type = "application/linkset+json; profile=\"https://www.rfc-editor.org/info/rfc9727\""

0 commit comments

Comments
 (0)