Skip to content

Conversation

@hadronix
Copy link

Enhance individual post handling by updating routes with a post-type prefix to prevent errors with other .txt endpoints

hadronix and others added 3 commits November 11, 2025 07:28
@retlehs
Copy link
Member

retlehs commented Nov 13, 2025

Is this working as expected for you? Individual posts .txt routes aren't working for me with this branch

@hadronix
Copy link
Author

Sorry, I unnecessarily changed the route while testing with multiple post types. The llms-txt command still outputs the regex variant so you can see at a glance which post types it's active for.

@retlehs
Copy link
Member

retlehs commented Nov 14, 2025

post-slug.txt still isn't working with that change

The sitemap generation, README, and code comments will also need updating to reflect the new pattern

@hadronix
Copy link
Author

I can't recreate this problem; on a fresh install, it works, e.g., with posts and pages.
acorn-test testpage-sample-page txt 2025-11-15 at 11 13 39 AM

I added the correct url. there an other "problem" currently, the sitemap fetches all posts and within the ContentFetcher it just checks if the individual_posts are enabled, but it uses the main postTypes array from the config and not the postTypes from the individual_posts config part. I have not a complete overview of the code, for this reason i just added an filter before fetching the posts. this is only a simple suggestion, i don't thing this is the best solution. we cant just filter the posts because the postTypes from global config and individual may complete differ (i don't know if this would make sense a production environment).

I look forward to your feedback on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants