SR
Usage

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.

templates/entry.twig
{% 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.

templates/entry.twig
{% 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.

templates/entry.twig
{% 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, and llms-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.

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.


Copyright © 2026 Samuel Reichör