When this Slidev hosting path fits
Use this workflow when Slidev is already your authoring tool and a deck-specific reader, same-URL updates, or public/unlisted sharing matters. Use GitHub Pages, Netlify, Vercel, or another general static host when you need to own the deployment project, serve arbitrary application behavior, or avoid Slidesfly's reader sandbox. Slidesfly does not edit or generate Slidev source.
Build Slidev with the verified base and reader helper
Pin the verified dependency
The proof fixture pins@slidev/cli 52.18.1and commits its lockfile.Build for an unknown nested reader path
Use--base ./. A root path such as/assets/escapes the versioned deck directory and returns 404.Patch opaque-origin storage and navigation
Copy the fixture'sinject-slidesfly-reader-bridge.mjshelper into your workspace and run it after every build.
npm install --save-exact @slidev/cli@52.18.1 @slidev/theme-default@0.25.0
npx slidev build slides.md --base ./ --out dist
node ./inject-slidesfly-reader-bridge.mjs dist/index.html slidev
test -f dist/index.htmlThe helper adds an in-memory localStorage/sessionStorage fallback before Slidev's first module runs, without replacing real storage on a normal origin. It also installs the Slidesfly reader-navigation bridge. Use the exact helper from the verified source fixture.
Create a zip with index.html at the root
cd dist
zip -r ../slidev-deck.zip .
cd ..
# These must show index.html and relative ./assets references
unzip -l slidev-deck.zip | head
grep -Eo '(src|href)="[^"]+"' dist/index.htmlThe verified archive is 343,533 compressed bytes and 803,544 uncompressed bytes. Its index.html references ./favicon.svg and ./assets/…. It does not reference a root /assets/… path.
Publish the archive and keep the returned URL
slidesfly login --json
slidesfly publish ./slidev-deck.zip --title "Slidev field guide" --visibility unlisted --jsonA successful publish returns the generated deck ID and reader URL:
{
"ok": true,
"data": {
"deck_id": "YOUR_GENERATED_DECK_ID",
"url": "https://slidesfly.xyz/d/YOUR_GENERATED_DECK_ID",
"visibility": "unlisted",
"anonymous": false
}
}Rebuild and republish with --id YOUR_DECK_ID to update the same reader URL. Public indexing, expiry, deletion, and quarantine remain separate lifecycle policies.
Slidev compatibility checks
| Area | Verified contract | What to check |
|---|---|---|
| Base path | Relative ./ URLs stay below the versioned reader path. | No root /assets references and no asset 404s. |
| Storage | The iframe has an opaque origin without normal persistent storage. | The fallback runs before module scripts; navigation reaches slide 2. |
| Runtime code | Remote script sources are rejected; local relative modules are supported. | Every runtime request stays inside the uploaded archive path. |
| Reader controls | Slidev's in-deck controls and the Slidesfly bridge both remain available. | Keyboard, pointer, touch, fullscreen, fonts, and code highlighting. |
sandbox="allow-scripts allow-popups allow-popups-to-escape-sandbox allow-forms"Slidev publishing failures and recovery
| Failure | Recovery |
|---|---|
AUTH_REQUIRED | Run the supported login flow, then retry the zip publish. |
FORBIDDEN | Use an eligible Pro account and public or unlisted visibility. |
INVALID_HTML | Confirm index.html is at the archive root and the archive stays within the current 50-file limit. |
MALICIOUS_CONTENT | Bundle remote scripts locally or use Report for a reproducible false positive. |
| Blank reader or storage error | Rebuild with --base ./, rerun the helper, and inspect failed requests. |
Slidev 52.18.1 live proof
The repository and reader index.html files are both 3,596 bytes with SHA-256 03e4d5ee614917178784854b1775c73066f4610127bdddbac022a1b1ef7fbad4. Browser verification advanced the production deck from slide 1 to slide 2 and loaded its declared runtime assets from the versioned reader path.