Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,44 @@ ignoreFiles = []
weight = -99
pre = "<i class='fab fa-github pr-2'></i>"
url = "https://github.com/kubeflow/"
[[menu.main]]
name = "AI-Ready Docs"
identifier = "llms"
weight = -98
pre = "<i class='fas fa-robot pr-2'></i>"
[[menu.main]]
name = "llms.txt"
parent = "llms"
weight = 1
pre = "<i class='fas fa-file-alt pr-2'></i>"
post = "<br><small class='text-muted'>Curated index</small>"
url = "/llms.txt"
[[menu.main]]
name = "llms-full.txt"
parent = "llms"
weight = 2
pre = "<i class='fas fa-file pr-2'></i>"
post = "<br><small class='text-muted'>Full documentation</small>"
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
Expand Down
46 changes: 46 additions & 0 deletions layouts/index.llms.txt
Original file line number Diff line number Diff line change
@@ -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: <https://github.com/kubeflow/>
- Documentation: <{{ site.BaseURL }}docs/>
{{ range $docs.Sections.ByWeight -}}
{{- if eq .RelPermalink "/docs/components/" -}}
{{- range .Sections.ByWeight -}}
{{- $sec := . -}}
{{- $t := replace (replace $sec.Title "&#39;" "'") "&amp;" "&" -}}
{{- printf "\n## %s\n\n" $t -}}
{{- if $sec.Params.description -}}
{{- $d := replace (replace $sec.Params.description "&#39;" "'") "&amp;" "&" -}}
{{- printf "- [%s](%s): %s\n" $t $sec.Permalink $d -}}
{{- else -}}
{{- printf "- [%s](%s)\n" $t $sec.Permalink -}}
{{- end -}}
{{- partial "llms-pages.html" (dict "section" $sec "legacy" false) -}}
{{- end -}}
{{- else -}}
{{- $sec := . -}}
{{- $t := replace (replace $sec.Title "&#39;" "'") "&amp;" "&" -}}
{{- printf "\n## %s\n\n" $t -}}
{{- if $sec.Params.description -}}
{{- $d := replace (replace $sec.Params.description "&#39;" "'") "&amp;" "&" -}}
{{- printf "- [%s](%s): %s\n" $t $sec.Permalink $d -}}
{{- else -}}
{{- printf "- [%s](%s)\n" $t $sec.Permalink -}}
{{- end -}}
{{- partial "llms-pages.html" (dict "section" $sec "legacy" false) -}}
{{- end -}}
{{- end -}}
{{- printf "\n## Optional\n\nLegacy (v1) documentation for components that have been upgraded. These pages are kept for historical reference.\n\n" -}}
{{- range $docs.Sections.ByWeight -}}
{{- if eq .RelPermalink "/docs/components/" -}}
{{- range .Sections.ByWeight -}}
{{- partial "llms-pages.html" (dict "section" . "legacy" true) -}}
{{- end -}}
{{- else -}}
{{- partial "llms-pages.html" (dict "section" . "legacy" true) -}}
{{- end -}}
{{- end -}}
15 changes: 15 additions & 0 deletions layouts/index.llmsfull.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- $docs := site.GetPage "/docs" -}}
# Kubeflow — Full Documentation Index

> 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.
{{ range $docs.Sections.ByWeight -}}
{{- if eq .RelPermalink "/docs/components/" -}}
{{- range .Sections.ByWeight -}}
{{- printf "\n## %s\n\n" .Title -}}
{{- partial "llms-full-pages.html" (dict "section" .) -}}
{{- end -}}
{{- else -}}
{{- printf "\n## %s\n\n" .Title -}}
{{- partial "llms-full-pages.html" (dict "section" .) -}}
{{- end -}}
{{- end -}}
1 change: 1 addition & 0 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
{{ end }}
<p>
<small class="text-white">Website <a href="{{ .Site.Params.privacy_policy }}" target="_blank" rel="noopener">Privacy Policy</a></small>
<small class="text-white"> | <a href="{{ "llms.txt" | absURL }}" rel="noopener">llms.txt</a> · <a href="{{ "llms-full.txt" | absURL }}" rel="noopener">llms-full.txt</a></small>
</p>
{{ if not .Site.Params.ui.footer_about_disable }}
{{ with .Site.GetPage "about" }}<p class="mt-2"><a href="{{ .RelPermalink }}">{{ .Title }}</a></p>{{ end }}
Expand Down
2 changes: 2 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
{{ end -}}
<link rel="alternate" type="text/plain" title="LLM-friendly documentation" href="{{ "llms.txt" | absURL }}">
<link rel="alternate" type="text/plain" title="LLM-friendly full documentation" href="{{ "llms-full.txt" | absURL }}">

{{ $outputFormat := partial "outputformat.html" . -}}
{{ if and hugo.IsProduction (ne $outputFormat "print") -}}
Expand Down
16 changes: 16 additions & 0 deletions layouts/partials/llms-full-pages.html
Original file line number Diff line number Diff line change
@@ -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 -}}
18 changes: 18 additions & 0 deletions layouts/partials/llms-pages.html
Original file line number Diff line number Diff line change
@@ -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 -}}
17 changes: 17 additions & 0 deletions layouts/partials/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
<li class="nav-item dropdown mt-1 mt-lg-0 {{ if $isLast }}mr-1 mr-lg-3 mr-xl-4{{ else }}mr-2 mr-xl-4{{- end }}">
<a class="nav-link dropdown-toggle" href="#" id="nav-dropdown-{{ $e.Identifier }}" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{- with $e.Pre }}{{ . }}{{ end -}}
<span>{{ $e.Name }}</span>
</a>
<div class="dropdown-menu" aria-labelledby="nav-dropdown-{{ $e.Identifier }}">
{{ range $e.Children -}}
<a class="dropdown-item" href="{{ .URL | relLangURL }}">
{{- with .Pre }}{{ . }}{{ end }}{{ .Name -}}
{{- with .Post }}{{ . }}{{ end -}}
</a>
{{ end -}}
</div>
</li>
{{ else -}}
<li class="nav-item mt-1 mt-lg-0 {{ if $isLast }}mr-1 mr-lg-3 mr-xl-4{{ else }}mr-2 mr-xl-4{{- end }} {{- if $longContent }} long-content {{- end }}">
{{ $active := or ($p.IsMenuCurrent "main" $e) ($p.HasMenuCurrent "main" $e) -}}
{{ with $e.Page }}{{ $active = or $active ( $.IsDescendant $e) }}{{ end -}}
Expand All @@ -59,6 +75,7 @@
</a>
</li>
{{ end -}}
{{ end -}}
<li class="nav-item mr-2 mt-1 mt-lg-0 py-md-2">
<div class="vr"></div>
</li>
Expand Down
Loading