diff --git a/docs/content/docs/guide/configuration.fa.md b/docs/content/docs/guide/configuration.fa.md index 984ffe8..8a13a64 100644 --- a/docs/content/docs/guide/configuration.fa.md +++ b/docs/content/docs/guide/configuration.fa.md @@ -505,6 +505,15 @@ outputs: - خلاصه صفحات و تاریخ انتشار - لینک‌های مستقیم به تمام محتوا +می‌توانید صفحات یا بخش‌های خاصی را با تنظیم `llms: false` در frontmatter آنها حذف کنید: + +```yaml +--- +title: "یادداشت‌های داخلی" +llms: false +--- +``` + فایل llms.txt به طور خودکار از ساختار محتوای شما ایجاد می‌شود و سایت شما را برای ابزارهای هوش مصنوعی و مدل‌های زبانی برای زمینه و مرجع قابل دسترس‌تر می‌کند. ### Open Graph diff --git a/docs/content/docs/guide/configuration.ja.md b/docs/content/docs/guide/configuration.ja.md index 724b00a..0cb59b5 100644 --- a/docs/content/docs/guide/configuration.ja.md +++ b/docs/content/docs/guide/configuration.ja.md @@ -505,6 +505,15 @@ outputs: - ページの要約と公開日 - すべてのコンテンツへの直接リンク +フロントマターで `llms: false` を設定することで、特定のページやセクションを除外できます: + +```yaml +--- +title: "内部メモ" +llms: false +--- +``` + llms.txt ファイルはコンテンツ構造から自動生成され、AI ツールや言語モデルがコンテキストや参照のためにあなたのサイトにアクセスしやすくします。 ### Open Graph diff --git a/docs/content/docs/guide/configuration.md b/docs/content/docs/guide/configuration.md index dc7b699..2565faf 100644 --- a/docs/content/docs/guide/configuration.md +++ b/docs/content/docs/guide/configuration.md @@ -600,6 +600,15 @@ This will generate an `llms.txt` file at your site's root containing: - Page summaries and publication dates - Direct links to all content +You can exclude specific pages or sections by setting `llms: false` in their front matter: + +```yaml +--- +title: "Internal Notes" +llms: false +--- +``` + The llms.txt file is automatically generated from your content structure and makes your site more accessible to AI tools and language models for context and reference. ### Open Graph diff --git a/docs/content/docs/guide/configuration.zh-cn.md b/docs/content/docs/guide/configuration.zh-cn.md index d0b6595..6082839 100644 --- a/docs/content/docs/guide/configuration.zh-cn.md +++ b/docs/content/docs/guide/configuration.zh-cn.md @@ -505,6 +505,15 @@ outputs: - 页面摘要和发布日期 - 所有内容的直接链接 +您可以通过在 front matter 中设置 `llms: false` 来排除特定页面或章节: + +```yaml +--- +title: "内部笔记" +llms: false +--- +``` + llms.txt 文件根据内容结构自动生成,使 AI 工具和语言模型更容易获取上下文和参考。 ### Open Graph diff --git a/layouts/llms.txt b/layouts/llms.txt index 65a9159..970e206 100644 --- a/layouts/llms.txt +++ b/layouts/llms.txt @@ -1,14 +1,13 @@ # {{ .Site.Title }} -> {{ .Site.Params.description }} +> {{ .Site.Params.description | default "" }} -{{ range $section := site.Sections }} +{{ range where site.Sections "Params.llms" "ne" false }} {{- template "llms-section-tree" dict "context" . "level" 2 }} {{ end }} -{{- $rootPages := where site.RegularPages "Section" "" }} +{{- $rootPages := where (where site.RegularPages "Section" "") "Params.llms" "ne" false }} {{- if $rootPages }} - ## Root Pages {{- range $rootPages }} - [{{ .Title }}]({{ .Permalink }}): {{ .Summary | plainify | truncate 100 | strings.TrimSpace }}{{ if .Date }} - Published {{ .Date.Format "2006-01-02" }}{{ end }} @@ -26,11 +25,11 @@ Site: {{ .Site.BaseURL }} {{- "\n" -}} {{ $headerHashes }} {{ $context.Title }} -{{- range $context.RegularPages }} +{{- range where $context.RegularPages "Params.llms" "ne" false }} - [{{ .Title }}]({{ .Permalink }}): {{ .Summary | plainify | truncate 100 | strings.TrimSpace }}{{ if .Date }} - Published {{ .Date.Format "2006-01-02" }}{{ end }} {{- end }} -{{- range $context.Sections }} +{{- range where $context.Sections "Params.llms" "ne" false }} {{ template "llms-section-tree" dict "context" . "level" (add $level 1) }} {{- end }} {{- end -}}