Skip to content

feat: add plain text page support#5748

Open
shreyanshkotak wants to merge 2 commits intowebstudio-is:mainfrom
shreyanshkotak:txt-support
Open

feat: add plain text page support#5748
shreyanshkotak wants to merge 2 commits intowebstudio-is:mainfrom
shreyanshkotak:txt-support

Conversation

@shreyanshkotak
Copy link
Copy Markdown
Contributor

@shreyanshkotak shreyanshkotak commented May 7, 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 2 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.
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.

1 participant