An open-source, self-hosted Linktree alternative. Edit one file, deploy anywhere. No accounts, no tracking, no monthly fee.
OpenLinkTree is a beautiful "links-in-bio" page built with Astro. Customize your profile, links, and widgets in a single TypeScript config file — then deploy a static site to Cloudflare Pages, Vercel, Netlify, or GitHub Pages.
- ⚡ Static site — fast, free to host, works without a database.
- 🎨 Animated WebGL aurora background with a CSS gradient fallback.
- 🧩 Widget system — start with
linksandcoupons; add your own. - 🪄 One config file —
src/config/site.config.tsis everything you edit. - ♿ Accessible — semantic HTML, focus styles,
prefers-reduced-motionaware. - 📱 Mobile-first responsive layout.
- 🌍 i18n-friendly — set your language with one field.
- 🆓 MIT licensed — fork it, sell it, do whatever.
# 1. Use this template (or clone)
git clone https://github.com/YOUR_USERNAME/openlinktree.git my-links
cd my-links
# 2. Install
pnpm install # or: npm install / yarn / bun install
# 3. Run locally at http://localhost:4321
pnpm devThen open src/config/site.config.ts and start editing.
Everything you need is in one file: src/config/site.config.ts.
profile: {
name: "Ada Lovelace",
handle: "@ada",
bio: "Mathematician · First programmer · Tea enthusiast",
avatar: "/images/avatar.jpg", // drop your file in public/images/
}seo: {
title: "Ada Lovelace — Links",
description: "Curated links from Ada Lovelace.",
lang: "en", // or "pt-BR", "es", "fr"...
ogImage: "/images/og.png", // 1200x630 recommended
}Tweak colors and font. The three aurora colors drive the animated background.
theme: {
bg: "#FAF5EE",
text: "#1A120D",
textMuted: "rgba(26,18,13,0.6)",
accent: "#8B5E3C",
accentStrong: "#6B4226",
accentLight: "#E8D5C0",
cardSurface: "rgba(255, 255, 255, 0.72)",
radius: "16px",
maxWidth: "480px",
fontFamily: "DM Sans",
fontUrl: "https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap",
aurora: { color1: "#FAF5EE", color2: "#F0E2D0", color3: "#E8D5C0" },
}💡 Tip: to use a different Google Font, copy the embed link from fonts.google.com, update
fontFamilyandfontUrl.
A widget is a block under the hero. Add as many as you want, in any order.
{
type: "links",
items: [
{
label: "My website",
href: "https://ada.dev",
description: "ada.dev",
icon: "globe",
highlight: true, // solid accent treatment, draws the eye
},
{ label: "Email", href: "mailto:hi@ada.dev", icon: "mail" },
{ label: "GitHub", href: "https://github.com/ada", icon: "github" },
],
}Built-in icons: instagram, twitter, x, github, linkedin, youtube,
tiktok, twitch, spotify, discord, whatsapp, telegram, mail, phone,
globe, link, store, kit, heart, star. Need another? Add an SVG case
in src/icons/Icon.astro.
Discount cards with a one-click "copy code" button.
{
type: "coupons",
title: "Featured discounts",
items: [
{
brand: "Acme Co.",
description: "Healthy snacks delivered.",
code: "ADA10",
discount: "10% off",
href: "https://acme.example",
logo: "/images/acme-logo.png", // optional
brandBg: "#1552CC", // optional — colored card
brandAccent: "#0A2F7A",
brandText: "#FFFFFF",
},
],
}- Add a case to the
Widgetunion insrc/types/site.ts. - Build a component in
src/components/(look atLinkCard.astroas a reference). - Render it inside the
widgets.map(...)block insrc/pages/index.astro.
That's it. The config types and the page stay strict-typed.
This is a static site. After pnpm build you get a dist/ folder you can host
anywhere. Common options:
- Push the repo to GitHub.
- Cloudflare Pages → Create project → connect your repo.
- Build settings:
- Framework preset: Astro
- Build command:
pnpm build(ornpm run build) - Build output directory:
dist
- (Optional) Add a custom domain like
links.yourdomain.com.
Both auto-detect Astro. Just import the repo. No config required.
Use @astrojs/upgrade and
set site in astro.config.mjs to your repo URL.
⚠️ Don't forget to updatesiteinastro.config.mjsto your final URL. It's used for SEO meta tags and the canonical link.
openlinktree/
├── public/
│ ├── images/ ← your photos / brand logos go here
│ └── favicon.svg
├── src/
│ ├── components/
│ │ ├── Hero.astro
│ │ ├── LinkCard.astro
│ │ ├── CouponCard.astro
│ │ └── AuroraBackground.astro
│ ├── config/
│ │ └── site.config.ts ← 👈 edit this
│ ├── icons/
│ │ └── Icon.astro
│ ├── layouts/
│ │ └── Layout.astro
│ ├── pages/
│ │ └── index.astro
│ └── types/
│ └── site.ts
├── astro.config.mjs
├── package.json
└── README.md
| Command | Action |
|---|---|
pnpm install |
Install dependencies |
pnpm dev |
Run dev server at localhost:4321 |
pnpm build |
Build the production site to ./dist/ |
pnpm preview |
Preview the build locally before deploy |
PRs welcome — new widgets, more icons, better themes, accessibility fixes. Keep it minimal and editable; the goal is for any user to read one config file and ship.
MIT — free for personal and commercial use.
Uma alternativa open source e self-hosted ao Linktree. Edite um arquivo só, faça deploy em qualquer lugar. Sem conta, sem tracking, sem mensalidade.
OpenLinkTree é uma página de "links na bio" linda construída com Astro. Personalize seu perfil, links e widgets em um único arquivo TypeScript — e publique como site estático no Cloudflare Pages, Vercel, Netlify ou GitHub Pages.
git clone https://github.com/SEU_USUARIO/openlinktree.git meus-links
cd meus-links
pnpm install
pnpm dev # abre em http://localhost:4321Abra src/config/site.config.ts e comece a editar.
Tudo está em um único arquivo: src/config/site.config.ts.
profile— nome, @, bio e avatar (coloque a imagem empublic/images/).seo— título, descrição, idioma e imagem OG.theme— cores, fonte e as 3 cores do fundo animado (aurora).widgets— array de blocos. Hoje temlinksecoupons(cupons de desconto com "copiar código"). Adicione quantos quiser, na ordem que quiser.footer— texto do rodapé. Use{year}para o ano atual.
{
type: "links",
items: [
{ label: "Meu site", href: "https://exemplo.com", icon: "globe", highlight: true },
{ label: "Email", href: "mailto:oi@exemplo.com", icon: "mail" },
{ label: "Instagram", href: "https://instagram.com/voce", icon: "instagram" },
],
}{
type: "coupons",
title: "Cupons exclusivos",
items: [
{
brand: "Marca",
description: "Snacks saudáveis",
code: "VOCE10",
discount: "10% off",
href: "https://marca.com.br",
brandBg: "#1552CC",
brandAccent: "#0A2F7A",
brandText: "#FFFFFF",
},
],
}- Faça push do repo no GitHub.
- No Cloudflare Pages, Create project → conecte o repositório.
- Configurações:
- Framework preset: Astro
- Build command:
pnpm build - Output directory:
dist
- (Opcional) Adicione um domínio próprio como
links.seudominio.com.
Atualize site em astro.config.mjs para a URL final — é usado nas meta tags
de SEO.
MIT — uso pessoal e comercial liberados.
