{{/* Copyright 2026 The Agent Substrate Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -}} {{ define "main" -}}
{{- $params := partialCached "page-params.html" . .Path -}} {{- with $params.status }}

{{ title . }}. {{ partial "rewrite-repo-links.html" (dict "content" (partial "status-text.html" $params) "dir" (path.Dir ($.Params.repo_source | default ""))) | markdownify }}

{{- end }}

{{ .Title }}

{{ with .Params.description }}

{{ . | markdownify }}

{{ end }}
{{- with .Params.estimated_time }} ⏱️ {{ . }} · {{- end }} {{ math.Max 1 .ReadingTime }} min read ·
{{- $content := string .Content -}} {{- if in (slice "docs/reference/glossary.md" "docs/glossary.md") .Params.repo_source -}} {{/* Anchor each term from the glossary doc on its bold label, which Goldmark renders at the start of the term's list item. */ -}} {{- range partialCached "glossary-terms.html" . "glossary" -}} {{- $label := replaceRE `([\\.+*?()|\[\]{}^$])` `\${1}` .term -}} {{- $pattern := printf `(
  • \s*(?:

    )?)%s` $label -}} {{- $anchored := replaceRE $pattern (printf `${1}%s` .id .term) $content 1 -}} {{- if eq $anchored $content -}} {{- errorf "glossary: term %q from %s: label not found on the glossary page" .term $.Params.repo_source -}} {{- end -}} {{- $content = $anchored -}} {{- end -}} {{- end -}} {{ $content | safeHTML }}

  • {{ partial "feedback.html" . -}} {{ partial "pager.html" . -}}
    {{ end -}}