Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions setup/website_llms/odoo/addons/website_llms
6 changes: 6 additions & 0 deletions setup/website_llms/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
129 changes: 129 additions & 0 deletions website_llms/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
================
Website llms.txt
================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:8a9926d7200ad9e863b35eef0281a85bde4f76ef4ed12ee7e35ffced4b32165d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fwebsite-lightgray.png?logo=github
:target: https://github.com/OCA/website/tree/18.0/website_llms
:alt: OCA/website
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/website-18-0/website-18-0-website_llms
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/website&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module adds support for serving a /llms.txt file in the website
root. The content can be configured per website in the website settings.

The llms.txt file provides information for Large Language Models (LLMs)
about your website, including company information, services, and content
links.

**Table of contents**

.. contents::
:local:

Usage
=====

Configuration
-------------

1. Go to **Website > Configuration > Settings**
2. In the **Website Info** section, find the **llms.txt Content** field
3. Enter the content you want to serve at /llms.txt
4. Save the settings

Usage
-----

After configuration, the /llms.txt file will be available at your
website root:

- If content is configured: The configured content will be served
- If content is empty: A default content will be generated based on your
website information

Example content format:

::

# Your Website — Information for LLMs

## Company
- About: https://yourdomain.com/aboutus
- Contact: https://yourdomain.com/contactus

## Services
- Service 1: https://yourdomain.com/service1
- Service 2: https://yourdomain.com/service2

## Content
- Blog: https://yourdomain.com/blog

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/website/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/website/issues/new?body=module:%20website_llms%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Escodoo

Contributors
------------

- `Escodoo <https://www.escodoo.com.br>`__:

- Marcel Savegnago <[email protected]>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-marcelsavegnago| image:: https://github.com/marcelsavegnago.png?size=40px
:target: https://github.com/marcelsavegnago
:alt: marcelsavegnago

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-marcelsavegnago|

This module is part of the `OCA/website <https://github.com/OCA/website/tree/18.0/website_llms>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions website_llms/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import controllers
19 changes: 19 additions & 0 deletions website_llms/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "Website llms.txt",
"version": "18.0.1.0.0",
"category": "Website",
"summary": """
This module adds support for serving a /llms.txt file in the website root.
The content can be configured per website in the website settings.
""",
"website": "https://github.com/OCA/website",
"author": "Escodoo, Odoo Community Association (OCA)",
"maintainers": ["marcelsavegnago"],
"depends": ["website"],
"data": [
"views/res_config_settings.xml",
],
"installable": True,
"application": False,
"license": "AGPL-3",
}
1 change: 1 addition & 0 deletions website_llms/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import main
47 changes: 47 additions & 0 deletions website_llms/controllers/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Copyright 2026 - TODAY, Marcel Savegnago <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import http
from odoo.http import request


class LlmsTxtController(http.Controller):
@http.route(
"/llms.txt",
type="http",
auth="public",
website=True,
sitemap=False,
methods=["GET"],
csrf=False,
)
def llms_txt(self, **kwargs):
"""
Serve the llms.txt file with content configured in website settings.
If no content is configured, returns a default message.
"""
website = request.website
content = website.llms_txt_content or ""

# If content is empty, return a default message
if not content.strip():
base_url = website.domain or request.httprequest.host_url.rstrip("/")
content = f"""# {website.name} — Information for LLMs

## Company
- Website: {base_url}
- About: {base_url}/aboutus
- Contact: {base_url}/contactus

## Content
- Blog: {base_url}/blog
"""

# Ensure content ends with a newline
content = content.strip() + "\n"

headers = [
("Content-Type", "text/plain; charset=utf-8"),
("Cache-Control", "public, max-age=3600"),
]

return request.make_response(content, headers=headers)
2 changes: 2 additions & 0 deletions website_llms/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import website
from . import res_config_settings
15 changes: 15 additions & 0 deletions website_llms/models/res_config_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2026 - TODAY, Marcel Savegnago <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models


class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"

llms_txt_content = fields.Text(
string="llms.txt Content",
related="website_id.llms_txt_content",
readonly=False,
help="Content to be served at /llms.txt. This file provides information "
"for Large Language Models (LLMs) about your website.",
)
14 changes: 14 additions & 0 deletions website_llms/models/website.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2026 - TODAY, Marcel Savegnago <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models


class Website(models.Model):
_inherit = "website"

llms_txt_content = fields.Text(
string="llms.txt Content",
help="Content to be served at /llms.txt. This file provides information "
"for Large Language Models (LLMs) about your website.",
translate=False,
)
3 changes: 3 additions & 0 deletions website_llms/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
2 changes: 2 additions & 0 deletions website_llms/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [Escodoo](https://www.escodoo.com.br):
- Marcel Savegnago \<[email protected]\>
6 changes: 6 additions & 0 deletions website_llms/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This module adds support for serving a /llms.txt file in the website
root. The content can be configured per website in the website settings.

The llms.txt file provides information for Large Language Models (LLMs)
about your website, including company information, services, and content
links.
30 changes: 30 additions & 0 deletions website_llms/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Configuration

1. Go to **Website \> Configuration \> Settings**
2. In the **Website Info** section, find the **llms.txt Content** field
3. Enter the content you want to serve at /llms.txt
4. Save the settings

## Usage

After configuration, the /llms.txt file will be available at your
website root:

- If content is configured: The configured content will be served
- If content is empty: A default content will be generated based on your
website information

Example content format:

# Your Website — Information for LLMs

## Company
- About: https://yourdomain.com/aboutus
- Contact: https://yourdomain.com/contactus

## Services
- Service 1: https://yourdomain.com/service1
- Service 2: https://yourdomain.com/service2

## Content
- Blog: https://yourdomain.com/blog
Loading
Loading