Folder structure

Required folders and recommended project shape.

src/
  pages/
    index.tsx
    docs/
      index.mdx
  layouts/
    base.tsx
    doc.tsx
    post.tsx
  components/
    blocks/
      hero.tsx
      sidebar.tsx
    ui/
      button.tsx
      typography.tsx

Required Folders

Sitex requires src/pages. TSX and MDX files in this folder become routes.

MDX pages also use src/layouts.

  1. layout: "doc" uses src/layouts/doc.tsx.
  2. layout: "post" uses src/layouts/post.tsx.

Keep routes thin. Routes choose layouts and provide page content.

Use src/layouts/base.tsx for shared metadata, navigation, and site chrome.

Use src/components for reusable implementation pieces. This folder is a convention, not a Sitex requirement.

Blocks

Place blocks in src/components/blocks. Blocks are reusable page sections, such as hero sections, feature grids, article frames, and sidebars.

UI

Place UI components in src/components/ui. UI components are low-level design system pieces, such as buttons, typography, inputs, breadcrumbs, and sidebar primitives.