SR
Usage

Content Control

Learn how to control the markdown files.


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

Copyright © 2025 Samuel Reichör