Document (dev.stxt.website): CMS and publishing | STXT Metadata: Last modif: 2026-09-19 Description: STXT as the source format for CMS and publishing: content lives in plain-text files, structure is visible and validation is a template. Header: CMS and publishing Assert >> @STXT@ as the **source format** of a website, a blog or a book: the content lives in text files and the presentation is decided afterwards. Content >> This portal is built that way. Each page of `stxt.dev` is an @STXT@ document of the `dev.stxt.website` namespace, and a generator turns it into HTML. It can be checked by adding `.stxt` to the address of any page, for example [use-cases-cms.stxt](use-cases-cms.stxt). Subheader: A page Code >> Page (com.acme.cms.page): Title: About STXT Slug: about-stxt Language: en Status: Published SEO: Description: A readable, validatable text language Keywords: Keyword: stxt Keyword: documents Content >> ## What is STXT? STXT is a language designed for writing documents that people read and programs process. ## Principles - Human First - Minimal syntax - Optional validation Footer >> Last updated: January 2026 Content >> In this example we have: * **Metadata**: `Title`, `Slug`, `Language`, `Status` and `SEO`. They are nodes the generator reads directly. * **Content**: `Content` and `Footer`. They are block nodes, and the document contains no HTML, CSS or layout. Subheader: The template Code >> Template (@stxt.template): com.acme.cms.page Structure >> Page: Title: (1) Slug: (1) Language: (?) ENUM [es, en, fr] Status: (1) ENUM [Draft, Published, Archived] SEO: (?) Description: (?) Keywords: (?) Keyword: (+) Content: (1) MARKDOWN Footer: (?) TEXT Content >> The [template](stxt-template-ref) guarantees what the generator needs in order to work: a title, a slug, a status from the list and a content. `Content` is of type `MARKDOWN` ([STXT-SCHEMA-SPEC ยง9.7](stxt-schema-ref#s9-7)). @STXT@ does not interpret that Markdown: it hands it over as is, and the type tells whoever receives it (the generator, the editor or the playground) how to treat it. `Footer` is `TEXT`, and it is shown literally. One lesson written with Frontmatter, MDX, Markdoc, YAML and @STXT@, and what each one validates: [STXT, prose inside structure](stxt-vs-markdown). Subsubheader: A page that does not validate Code >> # ERROR: this document does not validate Page (com.acme.cms.page): Title: About STXT # `Slug` is missing # Lowercase `published` is not `Published` Status: published # `Author` is not in the template Author: Joan Costa Content >> ## What is STXT? Content >> A page that does not validate is not generated. Subheader: A book in chapters Content >> A long publication follows the same pattern. Each chapter is a node with its number and its text: Code >> Publication (com.acme.editorial.publication): Title: STXT, the book ISBN: 978-1-23456-789-0 Language: en Status: In Progress Chapter: Introduction Number: 1 Content >> This chapter introduces the basic concepts of STXT. Chapter: Syntax Number: 2 Content >> The syntax of the language is described with examples. Chapter: Validation Number: 3 Content >> Templates and schemas add semantic rules. Content >> And its template: Code >> Template (@stxt.template): com.acme.editorial.publication Structure >> Publication: Title: (1) ISBN: (?) Language: (1) ENUM [es, en, fr] Status: (1) ENUM [In Progress, Published] Chapter: (+) Number: (1) NATURAL Content: (1) MARKDOWN Content >> An @STXT@ document is an ordered tree, so the chapters come out in the order in which they are written. A book of forty chapters can be split into forty files with the same namespace, and the template works for all of them. Subheader: The publishing flow Content >> 1. The document is written with any editor. 2. It is kept in a repository. The editorial review is a diff. 3. It is validated with `stxt validate` ([The command line](tools-cli)), locally or in continuous integration. 4. The generator reads the [tree](stxt-tree-ref) and produces HTML, PDF, EPUB or a feed. The presentation is decided in step 4, and it can be changed entirely without touching the content. Subheader: Limits Content >> @STXT@ is not a CMS: it has no editing interface, users, approval workflow or preview. It is the format in which the content is stored. It does not define which Markdown dialect is accepted in a `MARKDOWN` block either. That is decided by whoever renders it. Pages can also be written by a model, see [AI and LLMs](ai-llms).