feat(llms): add option to exclude pages and sections from llms.txt (#918)

* feat: improve section filtering in llms.txt

* fix(llms): correct where syntax and add page exclusion filter

- Fix invalid Hugo template syntax in where clause
- Use boolean comparison instead of string for llms param
- Add filtering to recursive llms-section-tree template
- Document llms exclusion feature in all languages (en, ja, fa, zh-cn)

---------

Co-authored-by: Xin <xin@imfing.com>
This commit is contained in:
Matheus Flausino
2026-01-29 18:06:12 -03:00
committed by GitHub
parent 50b9c927c2
commit 744e843880
5 changed files with 41 additions and 6 deletions

View File

@@ -505,6 +505,15 @@ outputs:
- خلاصه صفحات و تاریخ انتشار
- لینک‌های مستقیم به تمام محتوا
می‌توانید صفحات یا بخش‌های خاصی را با تنظیم `llms: false` در frontmatter آنها حذف کنید:
```yaml
---
title: "یادداشت‌های داخلی"
llms: false
---
```
فایل llms.txt به طور خودکار از ساختار محتوای شما ایجاد می‌شود و سایت شما را برای ابزارهای هوش مصنوعی و مدل‌های زبانی برای زمینه و مرجع قابل دسترس‌تر می‌کند.
### Open Graph

View File

@@ -505,6 +505,15 @@ outputs:
- ページの要約と公開日
- すべてのコンテンツへの直接リンク
フロントマターで `llms: false` を設定することで、特定のページやセクションを除外できます:
```yaml
---
title: "内部メモ"
llms: false
---
```
llms.txt ファイルはコンテンツ構造から自動生成され、AI ツールや言語モデルがコンテキストや参照のためにあなたのサイトにアクセスしやすくします。
### Open Graph

View File

@@ -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

View File

@@ -505,6 +505,15 @@ outputs:
- 页面摘要和发布日期
- 所有内容的直接链接
您可以通过在 front matter 中设置 `llms: false` 来排除特定页面或章节:
```yaml
---
title: "内部笔记"
llms: false
---
```
llms.txt 文件根据内容结构自动生成,使 AI 工具和语言模型更容易获取上下文和参考。
### Open Graph