Skip to content

Commit ee06a88

Browse files
committed
chore: implement agent-readiness improvements from audit
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
1 parent 2af0644 commit ee06a88

9 files changed

Lines changed: 223 additions & 83 deletions

File tree

hugo.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ outputFormats:
102102
mediaType: "text/plain"
103103
notAlternative: true
104104
permalinkable: false
105+
llmsfull:
106+
baseName: llms-full
107+
isPlainText: true
108+
mediaType: "text/plain"
109+
notAlternative: true
110+
permalinkable: false
105111

106112
# Enable custom output formats
107113
# (only generate the custom output files once)
@@ -112,6 +118,7 @@ outputs:
112118
- metadata
113119
- robots
114120
- llms
121+
- llmsfull
115122
page:
116123
- html
117124
- markdown

layouts/_partials/footer.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@
4949
class="inline-flex truncate whitespace-normal"
5050
>llms.txt</a
5151
>
52+
<a
53+
href="{{ "llms-full.txt" | relURL }}"
54+
class="inline-flex truncate whitespace-normal"
55+
>llms-full.txt</a
56+
>
5257
</div>
5358
<div class="flex items-center justify-end">
5459
<button
@@ -85,7 +90,6 @@
8590
class="border-t border-gray-200 bg-gray-100 px-4 py-4 text-sm text-gray-400 md:border-none dark:border-gray-700 dark:bg-gray-900 dark:text-gray-600"
8691
>
8792
<span
88-
>Copyright © 2013-{{ time.Now.Year }} Docker Inc. All rights
89-
reserved.</span
93+
>Copyright © 2013-{{ time.Now.Year }} Docker Inc. All rights reserved.</span
9094
>
9195
</div>

layouts/_partials/head.html

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@
22
<meta name="viewport" content="width=device-width, initial-scale=1" />
33
{{ partial "meta.html" . }}
44
{{- range .AlternativeOutputFormats -}}
5-
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink }}" />
5+
{{- if eq .Name "markdown" -}}
6+
<link
7+
rel="{{ .Rel }}"
8+
type="{{ .MediaType.Type }}"
9+
href="{{ partial "utils/markdown-url.html" $ }}"
10+
/>
11+
{{- else -}}
12+
<link
13+
rel="{{ .Rel }}"
14+
type="{{ .MediaType.Type }}"
15+
href="{{ .Permalink }}"
16+
/>
17+
{{- end -}}
618
{{ end -}}
719
{{ partialCached "utils/css.html" "-" "-" }}
8-
<link href="/pagefind/pagefind-component-ui.css" rel="stylesheet">
20+
<link href="/pagefind/pagefind-component-ui.css" rel="stylesheet" />
921
{{- if hugo.IsProduction -}}
1022
<script
1123
src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js"

layouts/_partials/meta.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<title>{{ site.Title }}</title>
44
{{ else }}
55
<title>
6-
{{ printf "%s | %s" .LinkTitle site.Title }}
6+
{{ printf "%s | %s" .Title site.Title }}
77
</title>
88
{{ end }}
99
{{ if or (eq .Params.sitemap false) (not hugo.IsProduction) }}
@@ -20,11 +20,11 @@
2020
<link rel="icon" href="/assets/images/favicon-32x32.png" sizes="32x32" />
2121
<link rel="icon" href="/assets/images/favicon-192x192.png" sizes="192x192" />
2222
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
23-
<link rel="shortcut icon" href="/favicon.ico">
23+
<link rel="shortcut icon" href="/favicon.ico" />
2424
<meta name="theme-color" content="#2496ed" />
2525

2626
<!-- SEO -->
27-
<meta name="twitter:title" itemprop="title name" content="{{ .LinkTitle }}" />
27+
<meta name="twitter:title" itemprop="title name" content="{{ .Title }}" />
2828
<meta
2929
name="twitter:description"
3030
property="og:description"
@@ -40,7 +40,7 @@
4040
content="{{ (resources.Get "images/thumbnail.webp").Permalink }}"
4141
/>
4242
<meta name="twitter:image:alt" content="Docker Documentation" />
43-
<meta property="og:title" content="{{ .LinkTitle }}" />
43+
<meta property="og:title" content="{{ .Title }}" />
4444
<meta property="og:description" content="{{ $description }}" />
4545
<meta property="og:type" content="website" />
4646
<meta

layouts/_partials/schema.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{{- $schema := dict
66
"@context" "https://schema.org"
77
"@type" "TechArticle"
8-
"headline" (truncate 110 .LinkTitle)
8+
"headline" (truncate 110 .Title)
99
"description" $description
1010
"url" .Permalink
1111
-}}
@@ -22,7 +22,8 @@
2222
{{- $schema = merge $schema (dict
2323
"mainEntityOfPage" (dict "@type" "WebPage" "@id" .Permalink)
2424
"inLanguage" site.Language.Lang
25-
) -}}
25+
)
26+
-}}
2627

2728
{{- /* Add author and publisher */ -}}
2829
{{- $logoUrl := printf "%sassets/images/docker-logo.png" (strings.TrimSuffix "/" site.BaseURL | printf "%s/") -}}
@@ -84,7 +85,6 @@
8485

8586
{{- /* Output the schema as JSON-LD */ -}}
8687
<script type="application/ld+json">{{ $schema | jsonify | safeJS }}</script>
87-
8888
{{- /* Add BreadcrumbList schema */ -}}
8989
{{- $breadcrumbs := slice -}}
9090
{{- $position := 1 -}}
@@ -94,8 +94,8 @@
9494
"@type" "ListItem"
9595
"position" $position
9696
"item" (dict
97-
"@id" .Permalink
98-
"name" (truncate 110 .LinkTitle)
97+
"@id" .Permalink
98+
"name" (truncate 110 .LinkTitle)
9999
)
100100
-}}
101101
{{- $breadcrumbs = $breadcrumbs | append $item -}}
@@ -108,8 +108,8 @@
108108
"@type" "ListItem"
109109
"position" $position
110110
"item" (dict
111-
"@id" .Permalink
112-
"name" (truncate 110 .LinkTitle)
111+
"@id" .Permalink
112+
"name" (truncate 110 .Title)
113113
)
114114
-}}
115115
{{- $breadcrumbs = $breadcrumbs | append $currentItem -}}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{{- $path := strings.TrimSuffix "/" .RelPermalink -}}
2+
{{- printf "%s.md" $path | absURL -}}

layouts/api.html

Lines changed: 166 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,174 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
3-
<head>
4-
{{ $specURL := urls.Parse (printf "/%s%s.yaml" .File.Dir .File.ContentBaseName) }}
5-
<title>{{ .Title }}</title>
6-
<!-- needed for adaptive design -->
7-
<meta name="viewport" content="width=device-width, initial-scale=1" />
8-
<meta name="description" content="{{ .Description }}" />
9-
<meta charset="utf-8" />
10-
<!-- favicon -->
11-
<link rel="icon" href="/assets/images/favicon-32x32.png" sizes="32x32" />
12-
<link rel="icon" href="/assets/images/favicon-192x192.png" sizes="192x192" />
13-
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
14-
<link rel="shortcut icon" href="/favicon.ico">
15-
<!--
3+
<head>
4+
{{ $specURL := urls.Parse (printf "/%s%s.yaml" .File.Dir .File.ContentBaseName) }}
5+
<title>{{ printf "%s | %s" .Title site.Title }}</title>
6+
<!-- needed for adaptive design -->
7+
<meta name="viewport" content="width=device-width, initial-scale=1" />
8+
<meta name="description" content="{{ .Description }}" />
9+
<meta charset="utf-8" />
10+
<link rel="canonical" href="{{ .Permalink }}" />
11+
<link
12+
rel="alternate"
13+
href="{{ partial "utils/markdown-url.html" . }}"
14+
type="text/markdown"
15+
title="{{ .Title }} (Markdown)"
16+
/>
17+
<!-- favicon -->
18+
<link rel="icon" href="/assets/images/favicon-32x32.png" sizes="32x32" />
19+
<link
20+
rel="icon"
21+
href="/assets/images/favicon-192x192.png"
22+
sizes="192x192"
23+
/>
24+
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
25+
<link rel="shortcut icon" href="/favicon.ico" />
26+
<!--
1627
Provide a link to the swagger / OpenAPI spec itself. We're currently using
1728
Swagger (OpenAPI v2) for some, so use a more generic "application/yaml" type.
1829
1930
Once all our specs are updated to OpenAPI v3, we can change this to "application/vnd.oai.openapi"
2031
-->
21-
<link rel="alternate" href="{{ $specURL.String | absURL }}" type="application/yaml" title="{{ .Title }} (Swagger/OpenAPI)" />
22-
<style>
23-
body {
24-
margin: 0;
25-
padding: 0;
26-
}
27-
28-
.menu-content>div:first-child {
29-
background-color: #086dd7;
30-
padding: 16px;
31-
}
32-
33-
.auth-tag,.pat,.oat {
34-
border-radius: 4px;
35-
color: #fff;
36-
padding: 5px;
37-
}
38-
39-
.pat {
40-
background-color: rgb(149, 80, 124);
41-
}
42-
43-
.pat::after {
44-
content: "personal access token";
45-
}
46-
47-
.oat::after {
48-
content: "org access token";
49-
}
50-
51-
.oat {
52-
background-color: rgb(24, 111, 175);
53-
}
54-
55-
.auth-tag:not(:last-child) {
56-
margin-right: 5px;
57-
}
58-
</style>
59-
</head>
60-
61-
<body>
62-
<noscript>
63-
<p>
64-
This page is rendered with JavaScript.<br>
65-
<a target="_blank" href="{{ $specURL.String | absURL }}" rel="noreferrer">Download {{ .Title }} Swagger/OpenAPI specification</a>
66-
</p>
67-
</noscript>
68-
{{ if or (strings.HasPrefix .RelPermalink "/reference/api/hub/") (strings.HasPrefix .RelPermalink "/reference/api/registry/") }}
69-
<redoc spec-url="{{ $specURL.String }}" suppress-warnings="true" lazy-rendering></redoc>
70-
{{ else }}
71-
<redoc spec-url="{{ $specURL.String }}" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
72-
{{ end }}
73-
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"></script>
74-
</body>
32+
<link
33+
rel="alternate"
34+
href="{{ $specURL.String | absURL }}"
35+
type="application/yaml"
36+
title="{{ .Title }} (Swagger/OpenAPI)"
37+
/>
38+
{{ partial "schema.html" . }}
39+
<style>
40+
body {
41+
margin: 0;
42+
color: #1f2933;
43+
font-family:
44+
Roboto Flex,
45+
Roboto,
46+
sans-serif;
47+
line-height: 1.5;
48+
}
7549

50+
.menu-content > div:first-child {
51+
background-color: #086dd7;
52+
padding: 16px;
53+
}
54+
55+
.auth-tag,
56+
.pat,
57+
.oat {
58+
border-radius: 4px;
59+
color: #fff;
60+
padding: 5px;
61+
}
62+
63+
.pat {
64+
background-color: rgb(149, 80, 124);
65+
}
66+
67+
.pat::after {
68+
content: "personal access token";
69+
}
70+
71+
.oat::after {
72+
content: "org access token";
73+
}
74+
75+
.oat {
76+
background-color: rgb(24, 111, 175);
77+
}
78+
79+
.auth-tag:not(:last-child) {
80+
margin-right: 5px;
81+
}
82+
83+
.api-shell {
84+
border-bottom: 1px solid #d9e2ec;
85+
padding: 32px 24px;
86+
}
87+
88+
.api-shell article {
89+
margin: 0 auto;
90+
max-width: 960px;
91+
}
92+
93+
.api-shell h1 {
94+
font-size: 2rem;
95+
line-height: 1.2;
96+
margin: 0 0 12px;
97+
}
98+
99+
.api-shell p {
100+
margin: 0 0 16px;
101+
max-width: 72ch;
102+
}
103+
104+
.api-links {
105+
display: flex;
106+
flex-wrap: wrap;
107+
gap: 12px;
108+
list-style: none;
109+
margin: 0;
110+
padding: 0;
111+
}
112+
113+
.api-links a {
114+
color: #086dd7;
115+
text-decoration: none;
116+
}
117+
118+
.api-links a:hover {
119+
text-decoration: underline;
120+
}
121+
122+
.redoc-container {
123+
min-height: calc(100vh - 220px);
124+
}
125+
</style>
126+
</head>
127+
128+
<body>
129+
<main>
130+
<section class="api-shell">
131+
<article>
132+
<h1>{{ .Title }}</h1>
133+
<p>{{ .Description }}</p>
134+
<ul class="api-links">
135+
<li>
136+
<a href="{{ partial "utils/markdown-url.html" . }}"
137+
>Open Markdown</a
138+
>
139+
</li>
140+
<li>
141+
<a href="{{ $specURL.String | absURL }}"
142+
>Download OpenAPI specification</a
143+
>
144+
</li>
145+
</ul>
146+
<noscript>
147+
<p>
148+
This reference uses JavaScript for the interactive explorer. Use
149+
the Markdown page or download the OpenAPI specification if
150+
JavaScript is unavailable.
151+
</p>
152+
</noscript>
153+
</article>
154+
</section>
155+
<article class="redoc-container">
156+
{{ if or (strings.HasPrefix .RelPermalink "/reference/api/hub/") (strings.HasPrefix .RelPermalink "/reference/api/registry/") }}
157+
<redoc
158+
spec-url="{{ $specURL.String }}"
159+
suppress-warnings="true"
160+
lazy-rendering
161+
></redoc>
162+
{{ else }}
163+
<redoc
164+
spec-url="{{ $specURL.String }}"
165+
hide-hostname="true"
166+
suppress-warnings="true"
167+
lazy-rendering
168+
></redoc>
169+
{{ end }}
170+
</article>
171+
</main>
172+
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"></script>
173+
</body>
76174
</html>

0 commit comments

Comments
 (0)