File tree Expand file tree Collapse file tree 5 files changed +105
-1
lines changed Expand file tree Collapse file tree 5 files changed +105
-1
lines changed Original file line number Diff line number Diff line change 3636 {{ partialCached "css.html" . }}
3737
3838 {{ block "head" . }}{{ end }}
39-
39+
40+ {{ partial "ai-metadata.html" . }}
41+
4042 {{ partial "fonts.html" . }}
4143
4244 {{ if hugo.IsProduction -}}
5658 {{ end }}
5759 </ head >
5860 < body class ="antialiased tracking-[-0.01em] bg-white w-full ">
61+ {{ partial "ai-metadata-body.html" . }}
62+
5963 {{ if hugo.IsProduction -}}
6064 < noscript > < iframe src ="https://www.googletagmanager.com/ns.html?id={{ .Site.Params.tagManagerId }} "
6165 height ="0 " width ="0 " style ="display:none;visibility:hidden "> </ iframe > </ noscript >
Original file line number Diff line number Diff line change 11# {{ .Title }}
2+
3+ ``` json metadata
4+ {
5+ "title" : " {{ .Title }}" ,
6+ "description" : " {{ .Description }}" ,
7+ "categories" : {{ .Params.categories | jsonify }}{{ if .Params.arguments }},
8+ "arguments" : {{ .Params.arguments | jsonify }}{{ end }}{{ if .Params.syntax_fmt }},
9+ "syntax_fmt" : {{ .Params.syntax_fmt | jsonify }}{{ end }}{{ if .Params.complexity }},
10+ "complexity" : {{ .Params.complexity | jsonify }}{{ end }}{{ if .Params.group }},
11+ "group" : {{ .Params.group | jsonify }}{{ end }}{{ if .Params.command_flags }},
12+ "command_flags" : {{ .Params.command_flags | jsonify }}{{ end }}{{ if .Params.acl_categories }},
13+ "acl_categories" : {{ .Params.acl_categories | jsonify }}{{ end }}{{ if .Params.since }},
14+ "since" : {{ .Params.since | jsonify }}{{ end }}{{ if .Params.arity }},
15+ "arity" : {{ .Params.arity | jsonify }}{{ end }}{{ if .Params.key_specs }},
16+ "key_specs" : {{ .Params.key_specs | jsonify }}{{ end }}
17+ }
18+ ```
19+
220{{ $content := .RawContent }}
321
422{{/* Fix relrefs * /}}
Original file line number Diff line number Diff line change 11# {{ .Title }}
2+
3+ ``` json metadata
4+ {
5+ "title" : " {{ .Title }}" ,
6+ "description" : " {{ .Description }}" ,
7+ "categories" : {{ .Params.categories | jsonify }}{{ if .Params.arguments }},
8+ "arguments" : {{ .Params.arguments | jsonify }}{{ end }}{{ if .Params.syntax_fmt }},
9+ "syntax_fmt" : {{ .Params.syntax_fmt | jsonify }}{{ end }}{{ if .Params.complexity }},
10+ "complexity" : {{ .Params.complexity | jsonify }}{{ end }}{{ if .Params.group }},
11+ "group" : {{ .Params.group | jsonify }}{{ end }}{{ if .Params.command_flags }},
12+ "command_flags" : {{ .Params.command_flags | jsonify }}{{ end }}{{ if .Params.acl_categories }},
13+ "acl_categories" : {{ .Params.acl_categories | jsonify }}{{ end }}{{ if .Params.since }},
14+ "since" : {{ .Params.since | jsonify }}{{ end }}{{ if .Params.arity }},
15+ "arity" : {{ .Params.arity | jsonify }}{{ end }}{{ if .Params.key_specs }},
16+ "key_specs" : {{ .Params.key_specs | jsonify }}{{ end }}
17+ }
18+ ```
19+
220{{ $content := .RawContent }}
321
422{{/* Fix relrefs * /}}
Original file line number Diff line number Diff line change 1+ {{- /* Generate AI-friendly metadata as a hidden div in the page body */ -}}
2+ {{- $metadata := dict "title" .Title "description" .Description "categories" .Params.categories -}}
3+ {{- if .Params.arguments -}}
4+ {{- $metadata = merge $metadata (dict "arguments" .Params.arguments) -}}
5+ {{- end -}}
6+ {{- if .Params.syntax_fmt -}}
7+ {{- $metadata = merge $metadata (dict "syntax_fmt" .Params.syntax_fmt) -}}
8+ {{- end -}}
9+ {{- if .Params.complexity -}}
10+ {{- $metadata = merge $metadata (dict "complexity" .Params.complexity) -}}
11+ {{- end -}}
12+ {{- if .Params.group -}}
13+ {{- $metadata = merge $metadata (dict "group" .Params.group) -}}
14+ {{- end -}}
15+ {{- if .Params.command_flags -}}
16+ {{- $metadata = merge $metadata (dict "command_flags" .Params.command_flags) -}}
17+ {{- end -}}
18+ {{- if .Params.acl_categories -}}
19+ {{- $metadata = merge $metadata (dict "acl_categories" .Params.acl_categories) -}}
20+ {{- end -}}
21+ {{- if .Params.since -}}
22+ {{- $metadata = merge $metadata (dict "since" .Params.since) -}}
23+ {{- end -}}
24+ {{- if .Params.arity -}}
25+ {{- $metadata = merge $metadata (dict "arity" .Params.arity) -}}
26+ {{- end -}}
27+ {{- if .Params.key_specs -}}
28+ {{- $metadata = merge $metadata (dict "key_specs" .Params.key_specs) -}}
29+ {{- end -}}
30+ {{- $json := $metadata | jsonify -}}
31+ {{- printf `< div hidden data-redis-metadata ="page "> %s</ div > ` $json | safeHTML -}}
32+
Original file line number Diff line number Diff line change 1+ {{- /* Generate AI-friendly metadata as JSON in a script tag for the header */ -}}
2+ {{- $metadata := dict "title" .Title "description" .Description "categories" .Params.categories -}}
3+ {{- if .Params.arguments -}}
4+ {{- $metadata = merge $metadata (dict "arguments" .Params.arguments) -}}
5+ {{- end -}}
6+ {{- if .Params.syntax_fmt -}}
7+ {{- $metadata = merge $metadata (dict "syntax_fmt" .Params.syntax_fmt) -}}
8+ {{- end -}}
9+ {{- if .Params.complexity -}}
10+ {{- $metadata = merge $metadata (dict "complexity" .Params.complexity) -}}
11+ {{- end -}}
12+ {{- if .Params.group -}}
13+ {{- $metadata = merge $metadata (dict "group" .Params.group) -}}
14+ {{- end -}}
15+ {{- if .Params.command_flags -}}
16+ {{- $metadata = merge $metadata (dict "command_flags" .Params.command_flags) -}}
17+ {{- end -}}
18+ {{- if .Params.acl_categories -}}
19+ {{- $metadata = merge $metadata (dict "acl_categories" .Params.acl_categories) -}}
20+ {{- end -}}
21+ {{- if .Params.since -}}
22+ {{- $metadata = merge $metadata (dict "since" .Params.since) -}}
23+ {{- end -}}
24+ {{- if .Params.arity -}}
25+ {{- $metadata = merge $metadata (dict "arity" .Params.arity) -}}
26+ {{- end -}}
27+ {{- if .Params.key_specs -}}
28+ {{- $metadata = merge $metadata (dict "key_specs" .Params.key_specs) -}}
29+ {{- end -}}
30+ {{- $json := $metadata | jsonify -}}
31+ {{- printf `< script type ="application/json " data-ai-metadata > % s </ script > ` $json | safeHTML -}}
32+
You can’t perform that action at this time.
0 commit comments