Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PrestaShop License Release Downloads

PrestaShop LLMS Generator

A minimal, update-proof /llms.txt generator for PrestaShop. It creates a single multi-language llms.txt file at your store root, including:

  • CMS pages (with an easy exclude checklist)
  • Categories
  • Products (all active products, no limit)

Every entry carries the resource's own meta description, in each shop language, rather than a generic type label:

## Français (FR) - Pages CMS
- [Livraison & Retour](https://www.vivarespire.com/fr/page/1-livraison-retours): Découvrez
  nos options de livraison via DPD Business, délais de traitement, suivi colis, retours,
  rétractation et conditions hygiène.

✅ No theme edits (safe for theme updates)
✅ Back-office configuration (multi-language title/description)
✅ Generates on Save, or on demand with a Generate now button
✅ Works with multi-language shops (FR/EN/NL/DE, etc.)
Atomic write: crawlers never read a half-written file
✅ Optional token-protected cron endpoint for scheduled regeneration
✅ Single PHP file, no namespace, no autoloader

Why a single file

Shared hosts run antivirus scanners that quarantine dynamic class loaders by renaming them. A module whose entry point does require_once 'src/autoload.php' then dies with a fatal error and takes the back office down with it. A module that writes one text file does not need that surface.

See the output

Live file generated by this module: www.vivarespire.com/llms.txt

That is VivaRespire, the author's CPAP and sleep apnea shop. The file covers 73 CMS pages, 19 categories and 47 products across 4 languages (FR, DE, EN, NL): 596 lines, 140 KB, generated in 50 ms.

Download

Get the latest version from the Releases page: https://github.com/iamadlx/PrestaShop-LLMS-Generator/releases

Tested on

PrestaShop 8.2.4
Hosting Infomaniak shared hosting (see below)
Shop size 73 CMS pages, 19 categories, 47 active products, 4 languages
Generation time ~50 ms

The module declares compatibility with PrestaShop 8.0.0 to 8.99.99. The PHP source is syntax-checked against PHP 7.4 and 8.1. It only requires mbstring, which PrestaShop already needs to run.

Hosting

This module is developed and run in production on Infomaniak shared hosting, which is also where every constraint it works around comes from: the antivirus that quarantines autoloaders, and the modest CPU budget that makes N+1 queries hurt.

If you are looking for a host with 1-click PrestaShop installation, easy updates and automatic backups, they offer a dedicated PrestaShop plan:

👉 https://www.infomaniak.com/fr/creer-un-site/cms/hebergement-prestashop

Disclosure: that is an affiliate link. It costs you nothing and the module works exactly the same on any host.

Installation (30 seconds)

  1. Download the latest release zip.

  2. In PrestaShop Back Office: Modules → Module Manager → Upload a module

  3. Upload the zip and install it.

  4. If your shop has accented content, add one line to your .htaccess, after the # ~~end~~ marker so PrestaShop does not overwrite it:

    AddCharset UTF-8 .txt

    Without it Apache serves .txt with no charset and browsers mangle every accent. The module's configuration page reminds you about this when it detects non-ASCII content in the generated file. See below for the full explanation.

Setup

  1. Go to Modules → PrestaShop LLMS Generator → Configure
  2. Set your Site title and Global description (multi-language fields)
  3. Choose what to include:
    • CMS pages (and uncheck the ones you want to exclude)
    • Categories
    • Products
  4. Click Save
  5. Open: https://your-domain.com/llms.txt

Scheduled regeneration (optional)

Generation is manual by default. To automate it, the configuration page shows a token-protected endpoint you can call from a cron job:

curl -fsS -H "X-Llms-Token: <your-token>" \
  "https://your-domain.com/module/ps_llms_generator/regenerate"

The header form keeps the secret out of your access logs. A ?token= query string is accepted for cron runners that cannot send headers. The token can be rotated from the configuration page at any time.

Accented characters show up as é?

The file is written in UTF-8, but Apache serves .txt as text/plain without a charset, so browsers fall back to Latin-1 and mangle every accent. This is a server header issue, not a file issue. Add one line to your .htaccess (after the # ~~end~~ marker, otherwise PrestaShop overwrites it):

AddCharset UTF-8 .txt

This module does not ship a UTF-8 BOM to work around it: a BOM renders as a stray glyph in front of the H1 in most Markdown readers, which is the wrong trade for a file meant to be parsed by machines.

Notes

  • The back-office interface follows your shop/BO language.
  • The generated llms.txt includes a section for each active shop language.
  • The file title and description use your default shop language, since the file has a single H1 and a single summary.
  • Prices and stock are deliberately not written to the file. It is a static snapshot and would advertise stale figures the moment you change a price.
  • Emoji are stripped from titles; trademark, registered and copyright signs are kept.
  • Entries without a meta description fall back to the category description or the product short description, then to a generic type label.

License

MIT

About

Minimal PrestaShop module that generates a multi-language /llms.txt (CMS, categories, products) for AI-friendly site discovery — no theme edits.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages