Skip to content

Add llms.txt support for AI/LLM website crawling #15361

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
5 changes: 5 additions & 0 deletions config/_default/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ timeout: 300000
outputFormats:
rss:
baseName: rss
TXT:
mediaType: text/plain
baseName: llms
isPlainText: true

# We set the outputs explicitly to just "HTML" as otherwise they default to both
# "HTML" and "RSS", and we only want to generate RSS for the blog section -- not
Expand All @@ -43,6 +47,7 @@ outputs:
home:
- HTML
- JSON
- TXT
section:
- HTML

Expand Down
98 changes: 98 additions & 0 deletions layouts/index.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{{- if ne hugo.Environment "preview" -}}
# Pulumi - Infrastructure as Code in Any Programming Language

> Pulumi's open source infrastructure as code SDK enables you to create, deploy, and manage infrastructure on any cloud, using your favorite languages. Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of familiar programming languages.

Pulumi is a modern infrastructure as code platform that allows you to use general-purpose programming languages (Python, TypeScript, Go, C#, Java, and YAML) to define, deploy, and manage cloud infrastructure. Unlike traditional template-based tools, Pulumi enables full software engineering practices including testing, IDE support, and code reuse.

## Documentation

{{- range $.Site.Sections }}
{{- if eq .Section "docs" }}
{{- range .Pages }}
{{- if not .Params.llms_exclude }}
- [{{ .Title }}]({{ .Permalink }}): {{ .Description | default .Summary | plainify | truncate 100 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

## Getting Started Guides

{{- $getStartedPages := where $.Site.Pages "Section" "docs" }}
{{- range $getStartedPages }}
{{- if and (not .Params.llms_exclude) (hasPrefix .RelPermalink "/docs/get-started/") }}
- [{{ .Title }}]({{ .Permalink }}): {{ .Description | default .Summary | plainify | truncate 100 }}
{{- end }}
{{- end }}

## Tutorials

{{- range $.Site.Sections }}
{{- if eq .Section "tutorials" }}
{{- range .Pages }}
{{- if not .Params.llms_exclude }}
- [{{ .Title }}]({{ .Permalink }}): {{ .Description | default .Summary | plainify | truncate 100 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

## Blog Posts

{{- $blogPages := where $.Site.Pages "Section" "blog" }}
{{- $recentBlogs := first 20 $blogPages }}
{{- range $recentBlogs }}
{{- if not .Params.llms_exclude }}
- [{{ .Title }}]({{ .Permalink }}): {{ .Description | default .Summary | plainify | truncate 100 }}
{{- end }}
{{- end }}

## What Is Guides

{{- range $.Site.Sections }}
{{- if eq .Section "what-is" }}
{{- range .Pages }}
{{- if not .Params.llms_exclude }}
- [{{ .Title }}]({{ .Permalink }}): {{ .Description | default .Summary | plainify | truncate 100 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

## Cloud Engineering Resources

{{- range $.Site.Sections }}
{{- if eq .Section "cloud-engineering" }}
{{- range .Pages }}
{{- if not .Params.llms_exclude }}
- [{{ .Title }}]({{ .Permalink }}): {{ .Description | default .Summary | plainify | truncate 100 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

## Templates and Examples

{{- range $.Site.Sections }}
{{- if eq .Section "templates" }}
{{- range .Pages }}
{{- if not .Params.llms_exclude }}
- [{{ .Title }}]({{ .Permalink }}): {{ .Description | default .Summary | plainify | truncate 100 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

## Case Studies

{{- range $.Site.Sections }}
{{- if eq .Section "case-studies" }}
{{- range .Pages }}
{{- if not .Params.llms_exclude }}
- [{{ .Title }}]({{ .Permalink }}): {{ .Description | default .Summary | plainify | truncate 100 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end -}}
Loading