Free Astro integration
Astro affiliate integration: astro-avdeb
astro-avdeb adds <AvdebProducts>, <AvdebProduct> and <AvdebButton> to your Astro site. Products are fetched at build or render time on the server, so pages ship plain HTML with your referral code on every link — no third-party scripts or iframes.
- v0.1.1
- Astro 5, 6 or 7
- Static (SSG) or server output, any adapter
- Free
Why use astro-avdeb on Astro
-
Zero-JS by default
Plain HTML and CSS; the only client script is ~40 lines for carousel arrows.
-
Your CSS wins
Every rule is :where()-wrapped, with 25+ --avdeb-* tokens, styles: false to bring your own CSS, and a headless getAvdebProducts().
-
Build-safe
Identical embeds share one request, results are cached per query, and the last good copy is served for a week if AVDEB is down.
-
Your referral code on every link
Paste a secret key or referral code once; every product link earns you 5% commission.
-
Honest links
Referral links get rel="sponsored", with an optional affiliate disclosure for FTC rules.
-
Private by default
No cookies, trackers or third-party scripts. Your secret key stays on the server.
-
Fast and resilient
Products are cached per query; if AVDEB is unreachable the last good copy is served for a week.
-
Four layouts
Grid, carousel, list (“shop the post”) and spotlight. Single products as a compact card, horizontal card or hero with your own badge and note.
How to add affiliate products to Astro
npx astro add astro-avdeb - 1
Add the integration
Run npx astro add astro-avdeb, or npm install astro-avdeb and add avdeb() to integrations in astro.config.mjs.
- 2
Connect your affiliate account
Add AVDEB_SECRET_KEY=avdeb_sk_… (up to 48 products per embed) or AVDEB_REF_CODE=YOURCODE (up to 12) to .env. The key never reaches the browser.
- 3
Use the components
Import from astro-avdeb/components and paste any avdeb.com creator, category or product link — the source is detected automatically.
Where products can go: .astro pages and layouts · MDX.
Examples
Components
---
import { AvdebProducts, AvdebProduct, AvdebButton } from "astro-avdeb/components";
---
<AvdebProducts url="https://avdeb.com/creators/your-slug/" heading="From my shop" />
<AvdebProducts tag="stickers" layout="carousel" columns={4} limit={10} />
<AvdebProduct handle="cat-sticker" variant="hero" badge="Editor's pick" />
<AvdebButton href="/creators/your-slug/" label="Visit my shop" variant="outline" /> Paste any avdeb.com creator , category or product link — the source is detected automatically.
Earn commission from your Astro site
-
5%
of every sale you refer
-
30 days
cookie window
-
$50
minimum payout, monthly via PayPal
-
Free
to join, open worldwide
The integration works without an account, but links only earn once you're an approved affiliate. Design stickers or 3D prints? Apply as a creator and show your own shop instead.
Astro integration FAQ
Does astro-avdeb work with static builds?
Yes. Products are fetched at build time for static output, or at render time with server output on any adapter.
Can I use it in MDX blog posts?
Yes. Import the components at the top of the MDX file and use them like in .astro files.
Is my secret key exposed?
No. The key is read on the server from .env and never sent to the browser. Pages contain only public product data and links.
How much can I earn as an AVDEB affiliate?
5% of every completed sale you refer, with a 30-day cookie and no cap. Commissions are paid monthly via PayPal in USD once your balance reaches $50. Joining is free and open worldwide; approval usually takes under 24 hours.
Secret key or referral code — which should I use?
Both credit your sales. A secret key (avdeb_sk_…) adds your code automatically, shows who you're connected as, and allows up to 48 products per embed; it stays on the server. A referral code alone allows up to 12 products. Never put a secret key in page content.
