Skip to content
Merged
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
43 changes: 41 additions & 2 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -189,17 +189,56 @@ enable = false
url = "https://www.reddit.com/r/Clickhouse/"
icon = "fab fa-reddit"
desc = "Altinity on Reddit"
[params.llms]
# Set to false to disable /llms.txt generation
generate_llms_txt = true

# Set to false to disable /llms-full.txt generation
generate_llms_full_txt = true

# Include only specific pages or directories.
# If empty, all pages are included by default.
# If populated, ONLY paths matching the list will be generated.
# Both llms.txt and llms-full.txt respect this setting.
# Examples:
# "/about/" → include strictly the /about/ page
# "/blog/*" → include immediate children of /blog/ (e.g. /blog/post-1/)
# "/blog/**" → include /blog/ and all nested pages and directories
include = []

# Exclude specific pages or directories.
# Follows the same wildcard formats as include.
# Conflict handling: If the EXACT same path string is put in both include and exclude,
# the include rule has higher priority (the exclude rule is ignored).
# Both llms.txt and llms-full.txt respect this setting.
# Examples:
# "/about/" → exclude exactly /about/
# "/blog/**" → exclude all pages under /blog/
# "/blog/post-1/" → exclude a specific page
exclude = []
[outputFormats]
[outputFormats.PRINT]
baseName = "index"
isHTML = true
mediaType = "text/html"
path = "printview"
permalinkable = false
[outputFormats.llms]
baseName = "llms"
isPlainText = true
mediaType = "text/plain"
rel = "alternate"
root = true
[outputFormats.llmsfull]
baseName = "llms-full"
mediaType = "text/plain"
isPlainText = true
notAlternative = true
root = true

# Controls the ability to print.
[outputs]
#home = ["HTML", "print"]
home = ["HTML", "print", "llms","llmsfull", "md"]
section = [ "HTML", "print"]
#page = ["HTML", "print"]

Expand All @@ -208,4 +247,4 @@ section = [ "HTML", "print"]
[[module.imports]]
path = "github.com/google/docsy"
[[module.imports]]
path = "github.com/google/docsy/dependencies"
path = "github.com/google/docsy/dependencies"
10 changes: 10 additions & 0 deletions layouts/index.llms.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# {{ .Site.Title }}
> {{ .Site.Params.description | default .Site.Title }}

## Pages
{{- range (where .Site.RegularPages "Language.Lang" "en") }}
- [{{ .Title }}]({{ .Permalink }}): {{ .Description | default .Summary | truncate 150 }}
{{- with .Params.keywords }}
*Keywords: {{ delimit . ", " }}*
{{- end }}
{{- end }}
18 changes: 18 additions & 0 deletions layouts/index.llmsfull.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# {{ .Site.Title }} - Full Content
{{- range (where .Site.RegularPages "Language.Lang" "en") }}
---
title: {{ .Title }}
url: {{ .Permalink }}
---

{{- /* 1. Get the raw content to avoid the 'plainify' disappearing act */ -}}
{{- $text := .RawContent -}}

{{- /* 2. Replace the encoded brackets with simple ones so the LLM understands them */ -}}
{{- $text = replace $text "&lt;" "<" -}}
{{- $text = replace $text "&gt;" ">" -}}

{{- /* 3. Output the content. The LLM will ignore the Hugo brackets. */ -}}
{{ $text | safeHTML }}

{{ end -}}
Loading