Skip to content

Comments

feat: AI向けllms.txtファイル生成機能の追加#81

Open
kbkn3 wants to merge 3 commits intomainfrom
llms-txt
Open

feat: AI向けllms.txtファイル生成機能の追加#81
kbkn3 wants to merge 3 commits intomainfrom
llms-txt

Conversation

@kbkn3
Copy link

@kbkn3 kbkn3 commented Jun 26, 2025

概要

lms.txtファイルを自動生成する機能を追加しました。
AI Agentにアクセシビリティガイドラインを効率的に提供できるようになります。

llms.txtとは

追加された機能

llms.txtファイルの生成

  • llms.txt: 簡易版(ガイドライン一覧とリンクのみ)
  • llms-full.txt: 完全版(全コンテンツ含む)

生成スクリプト

  • MDXファイルからコンテンツを抽出
  • Astroコンポーネント(Checkpoint、Cases、Case等)の解析
  • 日本語対応のアンカーID生成
  • HTMLコードブロックの正確な抽出

モジュラー設計

  • config.js: 設定管理
  • parsers/: ファイル解析モジュール
  • generators/: コンテンツ生成モジュール
  • logger.js: ログ・エラーハンドリング

デプロイ対応

  • GitHub Actionsワークフローに統合
  • 自動生成・S3同期対応
  • HTMLと一緒にllms.txtファイルもデプロイ

解析対象

  • src/content/guidelines/: デザイン・実装ガイドライン .mdx
  • src/pages/: はじめに・利用方法等の説明ページ .mdx, .astro

使用方法

npm run generate-llms

kbkn3 added 3 commits June 18, 2025 15:21
Introduce a modular llms.txt generation system for accessibility guidelines. Adds scripts for content parsing, Astro/MDX component extraction, code block handling, URL utilities, and configurable logging. Updates package scripts with a generate-llms command, adjusts naming for publish, and documents usage and structure. This improves maintainability and scalability for automated content export.
…ions

Add two new guideline documents:
- llms-full.txt: comprehensive LIFULL Accessibility Guidelines with detailed explanations and examples.
- llms.txt: summary version listing all guideline topics as a navigation index.

These resources provide designers and developers with both practical references and in-depth accessibility principles for LIFULL products.
Added steps to generate llms.txt files and copy them to the dist directory in the deploy workflow. Updated the S3 sync command to include .txt files in addition to .html files, ensuring that the generated text files are uploaded during deployment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant