diff --git a/config.toml b/config.toml
index 6a0f748e6f..a29eaa589d 100644
--- a/config.toml
+++ b/config.toml
@@ -92,12 +92,44 @@ ignoreFiles = []
weight = -99
pre = ""
url = "https://github.com/kubeflow/"
+ [[menu.main]]
+ name = "AI-Ready Docs"
+ identifier = "llms"
+ weight = -98
+ pre = ""
+ [[menu.main]]
+ name = "llms.txt"
+ parent = "llms"
+ weight = 1
+ pre = ""
+ post = "
Curated index"
+ url = "/llms.txt"
+ [[menu.main]]
+ name = "llms-full.txt"
+ parent = "llms"
+ weight = 2
+ pre = ""
+ post = "
Full documentation"
+ url = "/llms-full.txt"
###############################################################################
# Docsy - Output Formats
###############################################################################
+[outputFormats.LLMS]
+ mediaType = "text/plain"
+ baseName = "llms"
+ isPlainText = true
+ notAlternative = true
+
+[outputFormats.LLMSFull]
+ mediaType = "text/plain"
+ baseName = "llms-full"
+ isPlainText = true
+ notAlternative = true
+
[outputs]
-section = [ "HTML" ]
+ home = ["HTML", "LLMS", "LLMSFull"]
+ section = ["HTML"]
###############################################################################
# Docsy - Goldmark markdown parser
diff --git a/layouts/index.llms.txt b/layouts/index.llms.txt
new file mode 100644
index 0000000000..b72f10689c
--- /dev/null
+++ b/layouts/index.llms.txt
@@ -0,0 +1,46 @@
+{{- $docs := site.GetPage "/docs" -}}
+# Kubeflow
+
+> Kubeflow is the foundation of tools for AI Platforms on Kubernetes, providing a composable, modular, portable, and scalable AI reference platform backed by Kubernetes-native projects covering every stage of the AI lifecycle.
+
+Kubeflow enables AI platform teams to build production-ready ML workflows with tools for training, tuning, serving, pipelines, and notebooks. Each Kubeflow project can be used independently or as part of the full AI reference platform.
+
+- Source code:
Website Privacy Policy + | llms.txt · llms-full.txt
{{ if not .Site.Params.ui.footer_about_disable }} {{ with .Site.GetPage "about" }}{{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index c6083f8326..ef49c51790 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -4,6 +4,8 @@ {{ range .AlternativeOutputFormats -}} {{ end -}} + + {{ $outputFormat := partial "outputformat.html" . -}} {{ if and hugo.IsProduction (ne $outputFormat "print") -}} diff --git a/layouts/partials/llms-full-pages.html b/layouts/partials/llms-full-pages.html new file mode 100644 index 0000000000..a67132db42 --- /dev/null +++ b/layouts/partials/llms-full-pages.html @@ -0,0 +1,16 @@ +{{- $section := .section -}} +{{- range $section.Pages.ByWeight -}} + {{- $p := . -}} + {{- printf "### [%s](%s)\n" $p.Title $p.Permalink | safeHTML -}} + {{- with $p.Params.description -}} + {{- printf "> %s\n" . | safeHTML -}} + {{- end -}} + {{- printf "\n" -}} + {{- with $p.RawContent -}} + {{- printf "%s\n" (. | replaceRE `\{\{[<%].*?[>%]\}\}` "") | safeHTML -}} + {{- end -}} + {{- printf "\n" -}} + {{- if $p.IsSection -}} + {{- partial "llms-full-pages.html" (dict "section" $p) -}} + {{- end -}} +{{- end -}} diff --git a/layouts/partials/llms-pages.html b/layouts/partials/llms-pages.html new file mode 100644 index 0000000000..450644912b --- /dev/null +++ b/layouts/partials/llms-pages.html @@ -0,0 +1,18 @@ +{{- $section := .section -}} +{{- $legacy := .legacy -}} +{{- range $section.Pages.ByWeight -}} + {{- $p := . -}} + {{- $isLeg := in $p.RelPermalink "legacy-v1" -}} + {{- if eq $legacy $isLeg -}} + {{- if $p.Params.description -}} + {{- printf "- [%s](%s): %s\n" $p.Title $p.Permalink $p.Params.description | safeHTML -}} + {{- else -}} + {{- printf "- [%s](%s)\n" $p.Title $p.Permalink | safeHTML -}} + {{- end -}} + {{- end -}} + {{- if $p.IsSection -}} + {{- if or $legacy (not $isLeg) -}} + {{- partial "llms-pages.html" (dict "section" $p "legacy" $legacy) -}} + {{- end -}} + {{- end -}} +{{- end -}} diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html index 075778e402..621094a8ac 100644 --- a/layouts/partials/navbar.html +++ b/layouts/partials/navbar.html @@ -39,6 +39,22 @@ {{ range $i, $e := .Site.Menus.main -}} {{ $longContent := gt (len $e.Name) 8 -}} {{ $isLast := eq $i (sub $last 1) -}} + {{ if $e.HasChildren -}} +