What's on this page
Content for LLMs
Language models read Markdown more easily than HTML. Cecil provides two output formats for them:
llms: allms.txtfile, an index of the site;markdown: a Markdown version of each page.
Both are disabled by default.
llms.txt
Since version 8.114.0, the llms format renders the homepage as a llms.txt file at the root of the site. It contains:
- the site title and description;
- the links of the main menu;
- the top-level sections and their pages (sub-sections are nested), with their title and description.
To enable it, add the format to the homepage:
output:
pagetypeformats:
homepage:
llms: true
With the metatags template, the HTML homepage references the file with a <link rel="describedby" type="text/markdown"> tag.
Exclude content
To exclude a page or a section (and its pages) from llms.txt, set llms: false in its front matter:
---
title: "Legal notice"
llms: false
---
Unpublished and excluded sections are not listed.
Markdown pages
The markdown format renders a page as a Markdown file, next to its HTML version (e.g.: blog/post-1.md for blog/post-1/index.html). The file contains the title and the body of the page; a section lists its pages.
To render all pages and sections in Markdown:
output:
pagetypeformats:
page:
markdown: true
section:
markdown: true
Or for a single page, with the output variable:
---
output: [html, markdown]
---
With the metatags template, the HTML page references its Markdown version with a <link rel="alternate" type="text/markdown"> tag. The links of llms.txt point to the Markdown version of the pages when it exists.
Templates
To customize these outputs, override the default templates in your layouts directory (see lookup rules):
home.llms.twig: thellms.txtfile;page.markdown.twig,list.markdown.twigandhome.markdown.twig: the Markdown pages.