Right way to populate llms.txt / .md content when using custom pages and/or templates?

I have some custom templates to display some contents, like a Tags table and Recommendations which I can’t guess how I can “pass” the actual content when they are rendered for the llms and md “modes”.

Example 1:

The actual “normal” content for /tags/:

The custom template for /tags/:

Any ideas on how this could be done? Thanks! <3

Ran into this too.

llms-full.txt and the .md versions are built from what’s in the editor for each page, not from the rendered template. Your page-tags.hbs never runs for those outputs, so the {{#get 'tags'}} table and the recommendations just dont make it in, no matter how you build the template.

put copy of that content into the page body itself. Do it with a small script that uses the Admin API to rewrite the page’s content on a schedule, so the tag counts stay current. Then either keep your {{#get}} table for visitors and don’t output {{content}}, or show {{content}} instead.

the script would replace the whole page body, so don’t use the page to wrie anything manually.

Thank you very much, I’ll check your suggestions ASAP, I’ve made A LOT of changes since I’ve posted this question.