Skip to content

Commit ca95e1f

Browse files
committed
feat(llmstxt): code init
1 parent c50ef3f commit ca95e1f

23 files changed

Lines changed: 8794 additions & 1 deletion

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,7 @@ jobs:
5252
- name: Check Localizer
5353
run: |
5454
dotnet test test/UnitTest.Localization
55+
56+
- name: Check LLM Documentation
57+
run: |
58+
dotnet run --project tools/LlmsDocsGenerator -- --check

.github/workflows/docker.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v4
16+
17+
- name: Setup .NET Core SDK
18+
uses: actions/setup-dotnet@v4
19+
with:
20+
dotnet-version: 8.0.x
21+
22+
- name: Generate LLM Documentation
23+
run: |
24+
dotnet run --project tools/LlmsDocsGenerator
25+
1626
- name: Login to Docker Hub
1727
uses: docker/login-action@v3
1828
with:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,3 +379,6 @@ src/**/wwwroot/**/uploader
379379

380380
# css
381381
**/BootstrapBlazor/wwwroot/css/bootstrap.blazor.bundle.*.css
382+
383+
# Code Agents
384+
.claude

README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,64 @@ dotnet new install Bootstrap.Blazor.Templates::*
8787
dotnet new bbapp
8888
```
8989

90+
## For AI Code Agents
91+
92+
This project includes LLM-friendly documentation to help AI coding assistants (Claude Code, Cursor, GitHub Copilot, etc.) generate correct component usage.
93+
94+
### Online Access
95+
96+
Documentation files are available at: `https://www.blazor.zone/llmstxt/`
97+
98+
| File | URL |
99+
|------|-----|
100+
| Index | https://www.blazor.zone/llmstxt/llms.txt |
101+
| Table | https://www.blazor.zone/llmstxt/llms-table.txt |
102+
| Input | https://www.blazor.zone/llmstxt/llms-input.txt |
103+
| Select | https://www.blazor.zone/llmstxt/llms-select.txt |
104+
| Button | https://www.blazor.zone/llmstxt/llms-button.txt |
105+
| Dialog | https://www.blazor.zone/llmstxt/llms-dialog.txt |
106+
| Nav | https://www.blazor.zone/llmstxt/llms-nav.txt |
107+
| Card | https://www.blazor.zone/llmstxt/llms-card.txt |
108+
| TreeView | https://www.blazor.zone/llmstxt/llms-treeview.txt |
109+
| Form | https://www.blazor.zone/llmstxt/llms-form.txt |
110+
| Other | https://www.blazor.zone/llmstxt/llms-other.txt |
111+
112+
### Using in Your Project
113+
114+
Create a `llms.txt` in your project root to reference BootstrapBlazor documentation.
115+
116+
See the full example template: https://www.blazor.zone/llmstxt/llms-example-project.txt
117+
118+
Quick example:
119+
120+
```markdown
121+
# My Project
122+
123+
## Dependencies
124+
125+
### BootstrapBlazor
126+
- NuGet: BootstrapBlazor
127+
- Documentation: https://www.blazor.zone/llmstxt/llms.txt
128+
- Source Code: https://github.com/dotnetcore/BootstrapBlazor
129+
130+
For component parameters and usage:
131+
- Table: https://www.blazor.zone/llmstxt/llms-table.txt
132+
- Dialog: https://www.blazor.zone/llmstxt/llms-dialog.txt
133+
- ... (add others as needed)
134+
```
135+
136+
### Regenerate Documentation
137+
138+
```bash
139+
dotnet run --project tools/LlmsDocsGenerator
140+
```
141+
142+
### Check Documentation Freshness
143+
144+
```bash
145+
dotnet run --project tools/LlmsDocsGenerator -- --check
146+
```
147+
90148
## Contribution
91149
1. Fork
92150
2. Create Feat_xxx branch

src/BootstrapBlazor.Server/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
1515
WORKDIR /
1616
COPY . .
1717

18-
WORKDIR "src/BootstrapBlazor.Server"
18+
# Generate LLM documentation
19+
WORKDIR /tools/LlmsDocsGenerator
20+
RUN dotnet run
21+
22+
WORKDIR "/src/BootstrapBlazor.Server"
1923
FROM build AS publish
2024
RUN dotnet build
2125
RUN dotnet publish -c Release -o /app

0 commit comments

Comments
 (0)