/hero --bg gradient {
  /vcenter --height 90vh {
    /text "Polyester" --bold --size 4rem 
      --color white --tracking wide

    /region --padding 1rem {
      A document language that feels like home.

      Markdown simplicity meets programming power.
    }

    /button primary "Get Started"
    /button secondary "View on GitHub"
  }
}
Polyester

A document language that feels like home.

Markdown simplicity meets programming power.

/center {
  /text "Title" --size 2rem --bold
}

/columns 2 --gap 3rem {
  /region {
    Lorem ipsum dolor sit amet...
  }
  /region {
    /frame --border "2px solid black" {
      /image "d3.png" --width 100%
      --caption "important data"
    }
  }
}
De Finibus Bonorum et Malorum
Sed ut perspiciatis unde omnis iste natus error sit voluptatem.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam.

Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.

important data

Similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio.

## Why Polyester?

/columns 3 --gap 2rem {
  /card --icon rocket {
    ### Fast
    Compiles to HTML instantly.
  }

  /card --icon shield {
    ### Familiar
    If you know Markdown...
  }

  /card --icon bolt {
    ### Powerful
    Layouts, theming, highlighting.
  }
}

Why Polyester?

🚀

Fast

Compiles to HTML instantly. PDF via Chrome. Zero runtime overhead.

🛡️

Familiar

If you know Markdown and Slack , you know Polyester. Commands are just /slash syntax.

Powerful

Layouts, theming, code highlighting. Full control over your documents.

## The Syntax

/code polyester {
  /text "Hello" --bold --color blue
}

/code polyester {
  /columns 2 {
    /card { Left side }
    /card { Right side }
  }
}

The Syntax

Write documents with Markdown, supercharged with /commands.

Basic Command

/text "Hello" --bold --color blue

Commands start with /, take arguments and flags, and optionally contain blocks with { }.

Blocks & Nesting

/columns 2 {
  /card { Left side }
  /card { Right side }
}

Nest commands freely. Markdown content flows naturally between them.

## Layout Components

/frame --border "1px solid #e2e8f0"
--radius 12px --padding 2rem {

  /columns 2 --gap 2rem {

    /region {
      ### Columns & Grids

      /code polyester {
        /columns 3 --gap 1rem {
          Column 1
          Column 2
        }
      }
    }

    /region {
      ### Centering

      /code polyester {
        /vcenter --height 200px {
          Centered content
        }
      }
    }

  }
}

Layout Components

Build complex layouts without CSS gymnastics.

Columns & Grids

/columns 3 --gap 1rem {
  Column 1
  Column 2
  Column 3
}

/grid "2fr 1fr" {
  Wide column
  Narrow column
}

Centering

/center {
  Horizontally centered
}

/vcenter --height 200px {
  Vertically & horizontally
  centered content
}
/region --bg #1e293b --padding 3rem {

  /text "Content Components" --bold
  --size 1.5rem --color white

  /columns 2 --gap 2rem {

    /frame --bg #334155 --padding 1.5rem {
      /code typescript --lines
      --title "example.ts" {
        const greet = (name: User) =>
        console.log("Hello, " + name);
      }
    }

    /frame --bg #334155 --padding 1.5rem {
      /table --header --striped --dark {
        Feature | HTML | PDF
        Highlighting | Yes | Yes
      }
    }

  }
}
Content Components
Rich content primitives for documents.
Code Blocks
example.ts
1type User = string;
2const greet = (name: User) =>
3console.log("Hello, " + name);
4greet("World");
Tables
Feature
HTMLPDF
Syntax HighlightingYesYes
Line NumbersYesYes
Themes5+5+
## Interactive Elements

/fold "Click to expand" --open {
  /code typescript {
    const compile = (source: string) =>
    generateHTML(parse(source));
  }
}

/checkbox "Write docs" --checked
/checkbox "Add highlighting" --checked
/checkbox "World domination"

Interactive Elements

Collapsible Sections

Click to see implementation details
const compile = (source: string) =>
generateHTML(parse(source));

The compiler parses your .poly file into an AST, then renders to your target format.

Advanced configuration

Configuration options for power users. Theme customization, output formats, and more.

Task Lists

Progress: 4/5 complete

/region --bg #fef3c7 --padding 3rem {

  ## Design System

  /page A4 --style playful --spacing compact

  /columns 4 --gap 1rem {
    /frame --bg #1e40af --padding 1rem {
      /text "Corporate" --color white
    }
    /frame --bg #18181b --padding 1rem {
      /text "Minimal" --color white
    }
    /frame --bg #8b5cf6 --padding 1rem {
      /text "Playful" --color white
    }
    /frame --bg #0f172a --padding 1rem {
      /text "Dark" --color #60a5fa
    }
  }

}

Design System

Three composable modules—style, spacing, and syntax—that mix independently.

Corporate
Minimal
Playful
Dark
# Apply style + spacing presets
poly build doc.poly --style corporate --spacing compact

# Import terminal colorschemes
poly theme import ~/.Xresources --name my-theme
poly build doc.poly --theme my-theme
/region --padding 3rem {

  ## Pagination

  /page --pageless

  Content flows continuously...

  /pagebreak

  New section starts here.

}

Pagination

Control how PDFs are paginated. Use --pageless for continuous scrolling, or /pagebreak for explicit control.

Continuous
/page --pageless

One long page. Tables and figures stay intact.

Explicit Breaks
/pagebreak

Force a new page at any point.

## Editor Support

/columns 2 --gap 2rem {

  /card --icon star {
    ### VSCode Extension
    - Syntax highlighting
    - Autocomplete
    - Hover documentation
  }

  /card --icon bolt {
    ### Neovim Plugin
    - LSP integration
    - :PolyBuild command
    - Zathura PDF preview
  }

}

Editor Support

First-class IDE integration with full language intelligence.

VSCode Extension

  • Syntax highlighting
  • Autocomplete for commands & flags
  • Hover documentation
  • Theme Studio (Ctrl+Shift+T)
  • Build commands (Ctrl+Alt+H, Ctrl+Alt+P)
  • Error diagnostics

Neovim Plugin

  • Native syntax highlighting
  • LSP integration
  • :PolyBuild and :PolyPreview
  • Auto-build on save
  • Zathura PDF preview
npm install -g polyester

poly build document.poly
poly build document.poly --format pdf
poly build document.poly --style corporate --spacing spacious

poly help
poly help columns
poly style list

Quick Start

npm install -g polyester

poly build document.poly
poly build document.poly --format pdf
poly build document.poly --style corporate --spacing spacious

poly help
poly help columns
poly style list
## Component Reference

/columns 4 --gap 1rem {

  /region {
    /text "Layout" --bold
    /list --marker ">" {
      page
      columns
      grid
      region
      pagebreak
    }
  }

  /region {
    /text "Content" --bold
    /list --marker ">" {
      text
      code
      table
      image
      icon
      tag
    }
  }

}

Component Reference

27 built-in components across 4 categories
Layout
  • > page
  • > columns
  • > grid
  • > region
  • > sidebar
  • > center
  • > vcenter
  • > frame
  • > inline
  • > divider
  • > pagebreak
Content
  • > text
  • > quote
  • > code
  • > table
  • > list
  • > checkbox
  • > image
  • > icon
  • > tag
  • > progress
Style
  • > hero
  • > card
  • > button
  • > shape
  • > style
Interactive
  • > fold

Run poly help <component> for detailed documentation.

Polyester
Just as fake as any other way.
MIT License