Rettangoli VT Docs
Sites Integration

Use this when your app is generated by rtgl sites and you want VT with no custom JavaScript and local-versioned CLI usage through package scripts.

package.json:

{
  "scripts": {
    "watch": "rtgl sites watch -p 4173 -o dist --quiet",
    "build": "rtgl sites build -o dist",
    "generate": "rtgl vt generate",
    "screenshot": "rtgl vt screenshot",
    "report": "rtgl vt report",
    "accept": "rtgl vt accept"
  }
}

Minimal setup

rettangoli.config.yaml:

vt:
  path: ./vt
  url: http://127.0.0.1:4173
  service:
    start: npm run watch
  sections:
    - title: pages
      files: pages

Why this command

  • watch runs rtgl sites watch, which does initial build, serves output, and stays running.
  • VT can start/stop it automatically via vt.service.start.
  • build runs a production output build with rtgl sites build -o dist.
  • Scripts use the project-local rtgl binary.

Run VT

npm run generate
npm run screenshot
npm run report
npm run accept

Notes

  • Keep vt.url and -p on the same port.
  • -o dist is optional; default output is _site.
  • If your preview server is already running elsewhere, you can omit vt.service and keep only vt.url.

Optional: Markdown codePreview blocks

If your Sites pages include fenced blocks like:

```html codePreview
<rtgl-button>Click</rtgl-button>
```

Enable it in sites.config.yaml:

markdownit:
  codePreview:
    enabled: true
    showSource: true
    theme: slack-dark