Content Control
Learn how to control the markdown files.
LLMify gives you multiple ways to control what ends up in your Markdown output: Twig template tags, CSS class exclusion, and per-entry settings via the LLMify Settings Field.
Template Tags
To select content for Markdown generation, you can use the llmify and excludeLlmify tags in your templates.
These tags allow you to specify which parts of your content should be converted to Markdown and which parts should be excluded.
llmify
The body of llmify tags will be converted to markdown. You can use multiple llmify tags in your templates. They get merged together and the result is saved as a markdown file.
{% llmify %}
<h1>My Title</h1>
<p>My content</p>
{% endllmify %}
{% llmify %}
<p>More content</p>
{% endllmify %}
This will result in a markdown file that looks like this:
# My Title
My content
More content
excludeLlmify
In cases where you want to exclude certain content from being converted to markdown, you can use the excludeLlmify tag. This is useful for content that should not be part of the markdown generation.
{% llmify %}
<h1>My Title</h1>
<p>My content</p>
{% excludeLlmify %}
<p>This content will not be included in the markdown file.</p>
{% endexcludeLlmify %}
{% endllmify %}
This will result in a markdown file that looks like this:
# My Title
My content
Exclude by Class
If you need even more control about what gets included in the markdown generation, you can use the exclude-llmify class on any HTML.
If this class conflicts or you have multiple classes that should be excluded, you can configure them in the llmify.php config file.
{% llmify %}
<h1>My Title</h1>
<p>My content</p>
<p class="exclude-llmify">This content will not be included in the markdown file.</p>
{% endllmify %}
This will result in a markdown file that looks like this:
# My Title
My content
Per-Entry Control
The LLMify Settings Field is a custom Craft field that you can add to any Entry Type or Product Type. It provides per-entry control over:
- Include/Exclude: Toggle whether an individual entry is included in Markdown generation,
llms.txt, andllms-full.txt. - Title Override: Override the section-level title source with a custom field or static text.
- Description Override: Override the section-level description source with a custom field or static text.
- Front Matter Override: Override the inherited front matter fields for this specific entry.
To use it, create a new field of type "LLMify Settings" in Settings > Fields, and add it to the field layout of your Entry Type.
Section Order
Sections in llms.txt and llms-full.txt follow the order you set in LLMify > Content. Drag any row by its handle to reorder it. The new order is saved immediately and reflected the next time the files are requested.
The order is stored per site. In a multi-site setup you can switch sites via the breadcrumb dropdown and set a different order in each one.
New sections (or product types) you add later are appended to the end of the list.
Twig in Text Fields
All plain text fields in Site Settings, Content Settings, and the LLMify Settings Field accept Twig syntax. The same shorthand Craft uses for URI formats and Generated Fields works here:
{name} → object property (e.g. site or section name)
{{ object.handle }} → explicit Twig output
{{ now|date('Y-m-d') }} → dynamic values
The render context depends on where the field lives:
HTML tags are stripped from the output, so it is safe to reference CKEditor or other rich text fields.
If a Twig snippet fails to render (for example a typo in a function name), LLMify falls back to the string and logs a warning to storage/logs/llmify.log so the public llms.txt never breaks.
Troubleshooting
Empty Markdown
If your Markdown is generated but empty, it usually means the {% llmify %} tags are missing from your template, or they don't wrap any content.
Make sure your entry template includes at least one {% llmify %} block around the content you want to convert.
The sidebar panel in the entry editor will show a warning if Markdown is empty or the entry is deactivated for llmify through settings.