You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-9Lines changed: 38 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,23 +49,52 @@ The manual fix is tedious: open browser, navigate, log in, screenshot, crop, sav
49
49
npx heroshot
50
50
```
51
51
52
-
That's it. First time, a browser opens with a visual picker. Navigate to your app, click on elements you want to capture, name them, close when done.
52
+
First run opens a browser with a visual picker. Click what you want, name it, done. Screenshots land in `heroshots/`, config saves to `.heroshot/config.json`. Next run regenerates everything headlessly.
53
53
54
-
Your screenshots land in `heroshots/` and a config is saved to `.heroshot/config.json`.
54
+
## Use in Your Docs
55
55
56
-
Next time you run `npx heroshot`, it regenerates everything headlessly. No browser, no clicking - just fresh screenshots.
**Point and click, not CSS selectors.** The visual picker figures out how to find elements. You just click what you want.
64
+
```vue
65
+
<Heroshot name="dashboard" alt="Dashboard" />
66
+
```
61
67
62
-
**Light and dark mode in one go.** If your site has themes, heroshot captures both variants automatically. One config, two screenshots.
68
+
**Docusaurus**
63
69
64
-
**Desktop, tablet, mobile from one definition.** Add `"viewports": ["desktop", "tablet", "mobile"]` and get all three sizes. Combined with both color schemes, that's 6 screenshots from one entry.
70
+
```js
71
+
// docusaurus.config.js
72
+
plugins: [['heroshot/plugins/docusaurus', {}]];
73
+
```
65
74
66
-
**Log in once, capture forever.** First time, log into your app manually. Heroshot encrypts and saves your session. Headless runs are already authenticated - no login scripts needed.
75
+
```mdx
76
+
import { Heroshot } from'heroshot/docusaurus';
77
+
<Heroshotname="dashboard"alt="Dashboard" />
78
+
```
79
+
80
+
**MkDocs**
81
+
82
+
```bash
83
+
pip install heroshot
84
+
```
85
+
86
+
```yaml
87
+
# mkdocs.yml
88
+
plugins:
89
+
- macros:
90
+
modules: [heroshot]
91
+
```
92
+
93
+
```jinja
94
+
{{ heroshot("dashboard", "Dashboard overview") }}
95
+
```
67
96
68
-
**CI-ready.** Export your session key, add it to GitHub secrets, run `heroshot` in a workflow. Screenshots update automatically.
97
+
One component/macro, all variants - light/dark mode switches automatically, responsive sizes via srcset.
0 commit comments