Administrator
Installation
Install the extension with Composer:
composer require web-vision/ai-llms-txt
Then set up the extension, so that the TYPO3 caches are flushed:
vendor/bin/typo3 extension:setup
The extension is also available in the TYPO3 Extension Repository (TER) under
the key ai_. Classic mode installations are not covered by the
automated tests.
Setup
The extension works without further configuration: it registers its page types automatically and is enabled for every site.
- Import the route enhancer into each site configuration to get the
/llms.andtxt .mdURLs, see Route configuration. - Optionally adjust the title, summary and other values in the site configuration, see Site settings.
- To keep a site out of it entirely, disable llmsTxtEnabled for that site.
Available URLs
| URL | Output |
|---|---|
https:// | llms. (with route enhancer) |
https:// | llms. (with route enhancer) |
https:// | Markdown version of /about (with route enhancer) |
https:// | llms. (always available) |
https:// | Markdown version of /about (always available) |
Testing the installation
- Open
https://. It starts with the site title as aexample. com/ llms. txt #heading, followed by the summary and the list of pages. - Append
.mdto the URL of any regular page, for examplehttps://. The page content is shown as plain Markdown.example. com/ about. md
Exporting pages as Markdown files
The command ai- saves the Markdown version of pages
as .md files, for example to feed them into an AI knowledge base:
# Export all sites to var/markdown-export/
vendor/bin/typo3 ai-llms:download-markdown
# Export one site, with YAML frontmatter, and preview first
vendor/bin/typo3 ai-llms:download-markdown main --include-metadata --dry-run
| Argument / option | Description |
|---|---|
site | Site to export. Without it, all sites are exported. |
-o, -- | Target directory, relative to the project root.
Default: var/. |
-l, -- | Maximum number of pages to export. Default: 0 (no limit). |
-f, -- | File naming: slug (default), uid or title. |
-m, -- | Prepend YAML frontmatter with uid, title, description, URL, site and export time. |
-- | Write all files into one directory instead of one per site. |
-- | Overwrite existing files. |
-- | List what would be exported without writing files. |
The command fetches each page's .md URL over HTTP, so the site must be
reachable from the server under its configured base URL, and the route
enhancer must be imported.
Troubleshooting
/llms.returns "page not found"txt - The route enhancer is not imported into the site configuration, see
Route configuration.
/?type=1699works without any routing and helps to tell a routing problem apart from other causes. /.is not reachablewell- known/ llms. txt - Some web server configurations block paths starting with a dot. Allow
/.to be passed to TYPO3, or usewell- known/ /llms..txt - A page's
.mdURL returns "page not found" - This is intended when the extension is disabled for the site, or when
the page has Index this page switched off (
no_).index - A page is missing from
llms.txt - Check the conditions in What is listed in llms.txt. If caching is enabled and the page was changed outside the backend, for example by its start time passing, it appears once the cache entry expires.
llms.contains an "error: Failed to generate content" linetxt - Generation failed. The cause is logged through the TYPO3 logging
framework (by default in
var/), not shown in the response.log/
Performance
llms. is generated with batched database queries per tree level rather
than one query per page. On large sites, keep
llmsTxtMaxDepth low and set llmsTxtCacheLifetime
so the file is not rebuilt on every request.
The Markdown version of a page renders the full page through TYPO3 and converts it, so it takes about as long as rendering the HTML page.