Spaces:
Paused
Paused
Peng Ding commited on
Commit ·
b9705ce
1
Parent(s): 1e5c2ae
docs: add setup flow to veilrender skill — ask user for instance URL and token
Browse files- skills/veilrender/SKILL.md +29 -6
skills/veilrender/SKILL.md
CHANGED
|
@@ -19,18 +19,41 @@ Render JavaScript-heavy or bot-protected pages via a VeilRender API instance.
|
|
| 19 |
Use this when `curl`/`fetch` returns empty or incomplete content because the
|
| 20 |
page requires a real browser to render.
|
| 21 |
|
| 22 |
-
##
|
| 23 |
|
| 24 |
-
|
| 25 |
-
2. `curl` available in PATH
|
| 26 |
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
```bash
|
| 30 |
-
|
| 31 |
-
|
| 32 |
```
|
| 33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
## Render a page
|
| 35 |
|
| 36 |
Returns rendered HTML, Markdown, and/or readability-extracted article text.
|
|
|
|
| 19 |
Use this when `curl`/`fetch` returns empty or incomplete content because the
|
| 20 |
page requires a real browser to render.
|
| 21 |
|
| 22 |
+
## Setup
|
| 23 |
|
| 24 |
+
Before first use, check if the user already has a VeilRender instance configured.
|
|
|
|
| 25 |
|
| 26 |
+
**Step 1**: Check for existing configuration:
|
| 27 |
+
```bash
|
| 28 |
+
echo "URL: ${VEILRENDER_URL:-not set}"
|
| 29 |
+
echo "Token: ${VEILRENDER_TOKEN:+configured}"
|
| 30 |
+
```
|
| 31 |
|
| 32 |
+
**Step 2**: If either is missing, **ask the user**:
|
| 33 |
+
- "Do you have a hosted VeilRender instance? If so, what is the URL and API token?"
|
| 34 |
+
- If they don't have one, suggest self-hosting:
|
| 35 |
+
```bash
|
| 36 |
+
docker run -d -p 7860:7860 -e VEILRENDER_API_TOKEN=changeme oaklight/veilrender:latest
|
| 37 |
+
# Then set:
|
| 38 |
+
export VEILRENDER_URL="http://localhost:7860"
|
| 39 |
+
export VEILRENDER_TOKEN="changeme"
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
**Step 3**: Verify connectivity:
|
| 43 |
```bash
|
| 44 |
+
curl -sf "$VEILRENDER_URL/health" | jq .
|
| 45 |
+
# Expected: {"status": "ok"}
|
| 46 |
```
|
| 47 |
|
| 48 |
+
If health check fails, do NOT proceed — ask the user to check their instance.
|
| 49 |
+
|
| 50 |
+
### Required environment
|
| 51 |
+
|
| 52 |
+
| Variable | Required | Description |
|
| 53 |
+
|----------|----------|-------------|
|
| 54 |
+
| `VEILRENDER_URL` | Yes | Base URL of the VeilRender instance |
|
| 55 |
+
| `VEILRENDER_TOKEN` | If auth enabled | API Bearer token |
|
| 56 |
+
|
| 57 |
## Render a page
|
| 58 |
|
| 59 |
Returns rendered HTML, Markdown, and/or readability-extracted article text.
|