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