Skip to content

feat: add plain text page support#5783

Merged
kof merged 9 commits into
mainfrom
txt.staging
May 30, 2026
Merged

feat: add plain text page support#5783
kof merged 9 commits into
mainfrom
txt.staging

Conversation

@kof
Copy link
Copy Markdown
Member

@kof kof commented May 30, 2026

Description

Adds support for plain text pages. Related to #4257

This PR introduces text as a supported document type, stores plain text page content in page metadata, and generates text/plain route handlers for Remix and React Router templates.

It also limits HTML-specific Builder actions on text pages, excludes XML/text pages from the generated static sitemap, and adds SDK coverage for text document schema and sitemap behavior.

Steps for reproduction

  1. Create or edit a page in Builder.
  2. Set the document type to TEXT.
  3. Enter plain text content in page settings.
  4. Build with a Remix or React Router template.
  5. Open the generated text page URL, for example /robots.txt.
  6. Expect the response body to contain the configured text content with Content-Type: text/plain; charset=utf-8.
  7. In Builder, expect HTML insert/wrap/convert/tag actions to be unavailable for text pages.

Code Review

  • hi @kof, I need you to do
    • conceptual review (architecture, feature-correctness)
    • detailed review (read every line)
    • test it on preview

Before requesting a review

  • made a self-review
  • added inline comments where things may be not obvious (the "why", not "what")

Before merging

  • tested locally and on preview environment (preview dev login: 0000)
  • updated test cases document
  • added tests
  • if any new env variables are added, added them to .env file

shreyanshkotak and others added 7 commits May 6, 2026 22:26
Add text as a supported document type with page content metadata,
Builder page settings UI, and generated text/plain routes for Remix and
React Router templates.

Also restrict HTML mutation commands on non-HTML pages, exclude text/XML
pages from static sitemap output, and update CLI prebuild/link handling
for local generated projects.
# Conflicts:
#	apps/builder/app/builder/features/pages/page-settings.tsx
#	packages/sdk/src/schema/pages.test.ts
#	packages/sdk/src/schema/pages.ts
@kof kof changed the title chore: Test txt doc feat: add plain text page support May 30, 2026
@kof kof mentioned this pull request May 30, 2026
7 tasks
@kof kof merged commit d45d1b4 into main May 30, 2026
32 of 34 checks passed
@kof kof deleted the txt.staging branch May 30, 2026 10:10
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