Commit a4465a5
Create llms-txt-validation.js (#166)
* Create llms-txt-validation.js
Fetches /llms.txt and returns a simple validity flag (1 or 0). It checks that the response:
- Succeeds (HTTP 2xx)
- Has a Content-Type of text/plain
- Contains balanced Markdown code fences (…)
- Has matching counts of [ vs. ] and ( vs. )
If any check fails, it returns 0; otherwise it returns 1.
* Update llms-txt-validation.js
* Update llms-txt-validation.js
* Return JSON
* JSON stringify
* Update llms-txt-validation.js
* Rename llms-txt-validation.js to dist/llms-txt-validation.js
* Update llms-txt-validation.js
* Update llms-txt-validation.js
* Rename llms-txt-validation.js to llms_txt_validation.js
* Update llms_txt_validation.js
* Change to Boolean
* Validation Changes
Making LLMs.txt scoring less strict, so present - yet malformed llms.txt files - will always be marked as "valid", rather than invalid to make it easier to count total adoption whilst understanding which files have errors or not.
---------
Co-authored-by: Barry Pollard <[email protected]>
Co-authored-by: Max Ostapenko <[email protected]>1 parent d43f46b commit a4465a5
1 file changed
+23
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
0 commit comments