Skip to content

Commit 57c11e5

Browse files
mokuwakiclaude
andcommitted
Add full documentation site at /docs with MDX content, search, and dark mode
- Restructure root layout using (lp) route group to isolate LP from docs - Add docs system: MDX compilation (next-mdx-remote), syntax highlighting (shiki/rehype-pretty-code), Orama full-text search, dark mode (next-themes) - Create 11 documentation pages across 4 sections (Getting Started, Guides, Reference, Troubleshooting) - Build 28 docs components: layout shell, sidebar, header, TOC, search modal, 14 MDX components - Add Zod-validated content pipeline with meta.json navigation, search index generation - Link docs from LP footer and OpenSourceCTA section Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 13bb884 commit 57c11e5

63 files changed

Lines changed: 11140 additions & 3136 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,6 @@ yarn-error.log*
3939
# typescript
4040
*.tsbuildinfo
4141
next-env.d.ts
42+
43+
# generated
44+
public/docs/search-index.json
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
---
2+
title: Installation
3+
description: Install Rollberry using npx for zero-install usage, or globally via npm. Covers system requirements and verification.
4+
order: 1
5+
---
6+
7+
## Requirements
8+
9+
Rollberry requires **Node.js 18 or later**. You can check your current Node.js version by running:
10+
11+
```bash
12+
node --version
13+
```
14+
15+
If you need to install or update Node.js, visit [nodejs.org](https://nodejs.org/) or use a version manager like [nvm](https://github.com/nvm-sh/nvm):
16+
17+
```bash
18+
# Install Node.js 18+ using nvm
19+
nvm install 18
20+
nvm use 18
21+
```
22+
23+
Rollberry uses Playwright to manage the Chromium browser automatically. There is no need to install Chrome or Chromium separately — Playwright handles the browser binary download on first run.
24+
25+
## Zero-install with npx (recommended)
26+
27+
The easiest way to use Rollberry is with `npx`, which comes bundled with Node.js. This approach requires no installation at all:
28+
29+
```bash
30+
npx rollberry capture https://example.com
31+
```
32+
33+
On the first run, `npx` will download the `rollberry` package and its dependencies (including the Chromium browser binary). Subsequent runs will use the cached version.
34+
35+
This is the recommended approach for most users because:
36+
37+
- No global packages to manage or update
38+
- Always runs the latest version (or specify a version explicitly)
39+
- Clean environment with no side effects on your system
40+
- Works immediately in CI/CD pipelines
41+
42+
To pin a specific version:
43+
44+
```bash
45+
npx rollberry@0.1.3 capture https://example.com
46+
```
47+
48+
## Global installation
49+
50+
If you use Rollberry frequently, you can install it globally for faster startup:
51+
52+
```bash
53+
npm install -g rollberry
54+
```
55+
56+
After global installation, the `rollberry` command is available directly:
57+
58+
```bash
59+
rollberry capture https://example.com
60+
```
61+
62+
To update to the latest version:
63+
64+
```bash
65+
npm update -g rollberry
66+
```
67+
68+
To uninstall:
69+
70+
```bash
71+
npm uninstall -g rollberry
72+
```
73+
74+
## Verifying the installation
75+
76+
After installation, verify that Rollberry is working correctly:
77+
78+
```bash
79+
# Check the version
80+
npx rollberry --version
81+
```
82+
83+
Expected output:
84+
85+
```
86+
rollberry v0.1.3
87+
```
88+
89+
You can also run a quick test capture to confirm everything is set up properly:
90+
91+
```bash
92+
npx rollberry capture https://example.com --duration 3
93+
```
94+
95+
This should produce an MP4 file in the `./rollberry-output` directory within a few seconds.
96+
97+
## Platform support
98+
99+
Rollberry works on all platforms supported by Playwright:
100+
101+
| Platform | Architecture | Status |
102+
|---|---|---|
103+
| macOS | x64, arm64 (Apple Silicon) | Supported |
104+
| Linux | x64, arm64 | Supported |
105+
| Windows | x64 | Supported |
106+
107+
On Linux, you may need to install additional system dependencies for Chromium. Playwright provides a command to install them:
108+
109+
```bash
110+
npx playwright install-deps chromium
111+
```
112+
113+
## CI/CD environments
114+
115+
Rollberry works in CI/CD pipelines out of the box. For headless environments like GitHub Actions, GitLab CI, or Jenkins, no additional configuration is needed since Rollberry runs the browser in headless mode by default.
116+
117+
For Docker-based CI environments, you may need to install Chromium's system dependencies. See the [Common Issues](/docs/troubleshooting/common-issues) page for details on CI/CD setup.
118+
119+
## Next steps
120+
121+
With Rollberry installed, head to the [Quick Start](/docs/getting-started/quick-start) guide to capture your first page.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
title: Introduction
3+
description: Learn what Rollberry is, who it's for, and how full-page scrolling video captures can transform your workflow.
4+
order: 0
5+
---
6+
7+
## What is Rollberry?
8+
9+
Rollberry is a command-line tool that captures full-page scrolling videos of web pages using a real browser. Unlike traditional screenshot tools that produce static images, Rollberry records a smooth scrolling video of the entire page — from top to bottom — and outputs it as an MP4 file.
10+
11+
Under the hood, Rollberry launches a real Chromium browser via [Playwright](https://playwright.dev/), navigates to your target URL, and records the viewport as it scrolls through the page. This means every CSS animation, lazy-loaded image, and dynamic element is captured exactly as a real user would see it.
12+
13+
```bash
14+
npx rollberry capture https://example.com
15+
```
16+
17+
That single command produces a polished MP4 video of the full page in seconds.
18+
19+
## Who is Rollberry for?
20+
21+
Rollberry is designed for anyone who needs to capture how a web page actually looks and behaves:
22+
23+
- **Designers and developers** reviewing UI changes across pages or deployments
24+
- **QA teams** documenting visual state of web applications for test evidence
25+
- **Marketing teams** creating content that showcases landing pages or product features
26+
- **Agencies** delivering visual proof of completed work to clients
27+
- **DevOps engineers** integrating visual regression captures into CI/CD pipelines
28+
29+
## Why video instead of screenshots?
30+
31+
Static screenshots have significant limitations when it comes to capturing the full experience of a web page:
32+
33+
| Aspect | Screenshots | Rollberry Video |
34+
|---|---|---|
35+
| Below-the-fold content | Requires stitching or long-screenshot hacks | Naturally captured during scroll |
36+
| Animations & transitions | Frozen in a single frame | Recorded in full motion |
37+
| Lazy-loaded images | Often missing from static captures | Loaded as the page scrolls |
38+
| Sticky headers & footers | Overlapping content in stitched images | Rendered correctly at every scroll position |
39+
| File format | Multiple PNGs or one very tall image | Single MP4 video file |
40+
| Sharing | Requires image viewers or zooming | Plays anywhere videos play |
41+
42+
A scrolling video provides a faithful representation of the user experience that a static image simply cannot match.
43+
44+
## Key features
45+
46+
- **Zero install** — Run directly with `npx`, no global installation required
47+
- **Real browser rendering** — Uses Playwright with Chromium for pixel-perfect captures
48+
- **Localhost support** — Capture local development servers with automatic retry logic
49+
- **Custom viewport** — Set any resolution to match your target devices
50+
- **Smooth scrolling** — Configurable scroll speed and duration
51+
- **FPS control** — Adjust frame rate for quality vs. file size trade-offs
52+
- **Wait conditions** — Wait for specific selectors or a fixed delay before capturing
53+
- **Hide overlays** — Remove cookie banners, sticky headers, and other floating elements
54+
- **Debug mode** — Save individual frames as PNGs for inspection
55+
- **Structured logs** — JSONL output for programmatic processing
56+
- **MP4 output** — Industry-standard video format that plays everywhere
57+
58+
## How it works
59+
60+
Rollberry follows a straightforward capture pipeline:
61+
62+
1. **Launch** — A headless Chromium browser is started via Playwright
63+
2. **Navigate** — The browser loads the target URL and waits for the page to be ready
64+
3. **Prepare** — Optional wait conditions are applied (timers, selector visibility, overlay hiding)
65+
4. **Capture** — The viewport is recorded as the page scrolls from top to bottom
66+
5. **Encode** — Captured frames are assembled into an MP4 video file
67+
6. **Output** — The video and metadata are saved to the output directory
68+
69+
The entire process is automated and typically completes in under 30 seconds for most pages.
70+
71+
## Next steps
72+
73+
Ready to get started? Head to the [Installation](/docs/getting-started/installation) page to set up Rollberry, or jump straight to the [Quick Start](/docs/getting-started/quick-start) guide if you already have Node.js installed.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"title": "Getting Started",
3+
"icon": "rocket",
4+
"order": 0,
5+
"pages": ["introduction", "installation", "quick-start"]
6+
}
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
---
2+
title: Quick Start
3+
description: Capture your first full-page scrolling video in under a minute. Learn the basic commands and most common options.
4+
order: 2
5+
---
6+
7+
## Your first capture
8+
9+
The simplest Rollberry command takes just a URL:
10+
11+
```bash
12+
npx rollberry capture https://example.com
13+
```
14+
15+
This will:
16+
17+
1. Launch a headless Chromium browser
18+
2. Navigate to `https://example.com`
19+
3. Wait 1 second for the page to settle
20+
4. Scroll from top to bottom over 5 seconds
21+
5. Save an MP4 video to `./rollberry-output/`
22+
23+
The output directory will contain the video file along with a `manifest.json` describing the capture.
24+
25+
## Viewing the output
26+
27+
After the capture completes, open the output directory to find your video:
28+
29+
```bash
30+
ls ./rollberry-output/
31+
```
32+
33+
You will see output similar to:
34+
35+
```
36+
capture-2026-03-19T10-30-00.mp4
37+
manifest.json
38+
```
39+
40+
Open the MP4 file with any video player, or drag it into a browser window to preview.
41+
42+
## Customizing the viewport
43+
44+
By default, Rollberry captures at 1280x720 pixels. To capture at a different resolution, use the `--viewport` flag:
45+
46+
```bash
47+
# Desktop full HD
48+
npx rollberry capture https://example.com --viewport 1920x1080
49+
50+
# Mobile viewport (iPhone-like)
51+
npx rollberry capture https://example.com --viewport 390x844
52+
53+
# Tablet viewport (iPad-like)
54+
npx rollberry capture https://example.com --viewport 768x1024
55+
```
56+
57+
The viewport format is `WIDTHxHEIGHT` in pixels.
58+
59+
## Adjusting scroll duration
60+
61+
The `--duration` flag controls how long the scroll takes in seconds. A longer duration produces a slower, smoother scroll:
62+
63+
```bash
64+
# Quick 3-second scroll
65+
npx rollberry capture https://example.com --duration 3
66+
67+
# Slow, detailed 15-second scroll
68+
npx rollberry capture https://example.com --duration 15
69+
```
70+
71+
For very long pages, you may want to increase the duration to avoid scrolling too quickly.
72+
73+
## Specifying the output directory
74+
75+
By default, output goes to `./rollberry-output`. Use `--output` (or `-o`) to change this:
76+
77+
```bash
78+
npx rollberry capture https://example.com -o ./my-captures
79+
```
80+
81+
## Practical examples
82+
83+
Here are a few real-world usage patterns to get you started:
84+
85+
**Capture a landing page at full HD:**
86+
87+
```bash
88+
npx rollberry capture https://your-site.com \
89+
--viewport 1920x1080 \
90+
--duration 8
91+
```
92+
93+
**Capture a mobile view with cookie banner hidden:**
94+
95+
```bash
96+
npx rollberry capture https://your-site.com \
97+
--viewport 390x844 \
98+
--hide-selectors ".cookie-banner, .consent-dialog"
99+
```
100+
101+
**Capture a local development server:**
102+
103+
```bash
104+
npx rollberry capture http://localhost:3000 \
105+
--wait 2000 \
106+
--duration 10
107+
```
108+
109+
**Wait for a specific element before capturing:**
110+
111+
```bash
112+
npx rollberry capture https://your-site.com \
113+
--wait-for-selector ".hero-image" \
114+
--duration 6
115+
```
116+
117+
## What happens during a capture
118+
119+
When you run a capture, Rollberry provides progress output in your terminal:
120+
121+
```
122+
Rollberry v0.1.3
123+
Capturing: https://example.com
124+
Viewport: 1280x720
125+
Duration: 5s
126+
FPS: 30
127+
128+
[1/4] Launching browser...
129+
[2/4] Navigating to page...
130+
[3/4] Scrolling and capturing...
131+
[4/4] Encoding video...
132+
133+
Done! Output saved to ./rollberry-output/capture-2026-03-19T10-30-00.mp4
134+
```
135+
136+
If anything goes wrong, Rollberry will display a clear error message. For help debugging issues, see the [Debugging](/docs/guides/debugging) guide.
137+
138+
## Next steps
139+
140+
Now that you know the basics, explore these topics:
141+
142+
- [CLI Options Reference](/docs/reference/cli-options) — Full list of all available flags
143+
- [Capturing Multiple Pages](/docs/guides/multi-page) — Batch capture workflows
144+
- [Localhost Captures](/docs/guides/localhost) — Capture local dev servers
145+
- [Hiding Overlays](/docs/guides/hiding-overlays) — Remove cookie banners and sticky elements

0 commit comments

Comments
 (0)