From 993dae98bc021b5428e0f0718cbe93bdb8b2177b Mon Sep 17 00:00:00 2001 From: Simran Spiller Date: Tue, 17 Jun 2025 10:05:44 +0200 Subject: [PATCH] PoC: llms.txt based on page titles and descriptions --- site/config/_default/config.yaml | 6 +++- .../layouts/_default/home.llms.txt | 28 +++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 site/themes/arangodb-docs-theme/layouts/_default/home.llms.txt diff --git a/site/config/_default/config.yaml b/site/config/_default/config.yaml index 67c2321b61..cf5d265022 100644 --- a/site/config/_default/config.yaml +++ b/site/config/_default/config.yaml @@ -54,9 +54,13 @@ outputFormats: baseName: notfound isHTML: true mediaType: text/html + llms: + baseName: llms + isHTML: false + mediaType: text/plain outputs: - home: ["HTML", "navigation", "notfound"] + home: ["HTML", "navigation", "notfound", "llms"] enableRobotsTXT: true diff --git a/site/themes/arangodb-docs-theme/layouts/_default/home.llms.txt b/site/themes/arangodb-docs-theme/layouts/_default/home.llms.txt new file mode 100644 index 0000000000..8fa6d627f7 --- /dev/null +++ b/site/themes/arangodb-docs-theme/layouts/_default/home.llms.txt @@ -0,0 +1,28 @@ +# ArangoDB + +> ArangoDB is a scalable graph database system to drive value from connected data, faster. Native graphs, an integrated search engine, and JSON support, via a single query language. ArangoDB runs on-prem, in the cloud – anywhere. +{{ range .Site.Sections.ByWeight }} +{{- if eq (.Store.Get "alias") "stable" }} +{{- /* ## Version {{ .Type }} */}} + +{{- $pages := .Pages }} +{{- range $pages.ByWeight }} +## {{ .Title | safeHTML }}{{ if .Description }} + +{{ replace .Description "\n" " " | safeHTML }}{{ end }} + +{{ template "section-tree-llm" . }} +{{- end }} +{{- end }} +{{- end }} + +{{- define "section-tree-llm" }} +{{- range .Pages.ByWeight }} +{{- if .Description -}} +- [{{ .Title | safeHTML }}]({{ .Permalink }}): + {{ replace .Description "\n" " " | safeHTML }} + +{{ end }} +{{- template "section-tree-llm" . }} +{{- end }} +{{- end }}