A modern, mobile-first link tree website built with Astro and Tailwind CSS.
This project follows Astro best practices with a component-based architecture:
src/
βββ layouts/
β βββ Layout.astro # Main page layout with head/body structure
βββ components/
β βββ ProfileHeader.astro # Profile avatar, name, and tagline
β βββ SocialLinks.astro # Horizontal social media links
β βββ FeaturedCTA.astro # Prominent featured call-to-action
β βββ LinkCard.astro # Vertical CTA link card component
β βββ Footer.astro # Site footer with copyright
βββ content/
β βββ config.ts # Schema definitions for content collections
β βββ profile/
β βββ clark.mdx # Profile data and content
βββ pages/
βββ index.astro # Main page composition
- Reusable page layout with SEO meta tags
- Responsive viewport configuration
- Google Fonts integration
- Gradient background styling
- Displays profile avatar or initials
- Configurable name and tagline
- Supports custom avatar images
- Horizontal layout for social media icons
- Circular glassmorphism-styled buttons
- Hover animations with scale effects
- Tooltips showing platform names
- Eye-catching gradient border design
- Larger size with prominent positioning
- Animated glow effect and scale transforms
- Perfect for driving primary conversions
- Vertical CTA and website links
- Glassmorphism-styled link buttons
- SVG icon support
- Hover animations and micro-interactions
- External link handling with proper
targetandrelattributes
- Dynamic copyright year
- Minimal, clean styling
This project uses Astro's Content Collections API for type-safe content management:
src/content/
βββ config.ts # Content collection schema definitions
βββ profile/
βββ clark.mdx # Profile data and links in MDX format
const profileCollection = defineCollection({
type: 'content',
schema: z.object({
name: z.string(),
tagline: z.string(),
initials: z.string(),
avatar: z.string().optional(),
links: z.array(z.object({
title: z.string(),
href: z.string(),
icon: z.string(),
})),
}),
});The profile data is stored as frontmatter in an MDX file, allowing for both structured data and rich content:
---
name: "Clark Sell"
tagline: "Founder - Unspecified"
initials: "C"
socialLinks:
- title: "Twitter"
href: "#"
icon: '<svg>...</svg>'
- title: "LinkedIn"
href: "#"
icon: '<svg>...</svg>'
# ... more social links
featuredCta:
title: "π Book a Strategy Call"
href: "#"
icon: '<svg>...</svg>'
ctaLinks:
- title: "My Website"
href: "#"
icon: '<svg>...</svg>'
- title: "Book a Call"
href: "#"
icon: '<svg>...</svg>'
# ... more CTA links
---
# Welcome to Clark.Land
Your content goes here...import { getEntry } from 'astro:content';
const profileEntry = await getEntry('profile', 'clark');
const { name, tagline, socialLinks, ctaLinks } = profileEntry?.data || {};- Dual Layout System: Horizontal social links + vertical CTAs for optimal UX
- Content Collections: Type-safe content management with Astro's native API
- MDX Support: Rich content authoring with Markdown + components
- Component Reusability: Modular components for easy maintenance and customization
- TypeScript Support: Type-safe component props and data structures
- Schema Validation: Zod-powered content validation at build time
- Mobile-First Design: Responsive layout optimized for mobile devices
- Modern UI: Glassmorphism effects with backdrop blur and subtle animations
- SEO Optimized: Proper meta tags and semantic HTML structure
- Accessible: Semantic markup and proper link attributes
The page follows a clean, hierarchical layout:
- Profile Header - Avatar/initials, name, and tagline
- Social Links - Horizontal row of circular social media buttons
- Featured CTA - Eye-catching primary call-to-action with gradient styling
- CTA Links - Vertical stack of secondary call-to-action buttons
- Footer - Copyright and branding
This structure creates a clear conversion funnel: social discovery β primary action β secondary actions, maximizing the effectiveness of your most important CTA while maintaining easy access to other resources.
- Update Profile: Edit the frontmatter in
src/content/profile/clark.mdx - Add/Remove Social Links: Modify the
socialLinksarray for horizontal social buttons - Set Featured CTA: Update the
featuredCtaobject for your primary conversion goal - Add/Remove CTAs: Modify the
ctaLinksarray for vertical call-to-action buttons - Add Content: Write Markdown content below the frontmatter
- Change Styling: Update Tailwind classes in components
- Add New Components: Create reusable components following the established patterns
- Multiple Profiles: Create additional MDX files in
src/content/profile/
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production buildNote: Requires Node.js >=18.20.8 to run the development server.
- Maximum width container (max-w-md) for optimal mobile viewing
- Touch-friendly button sizes and spacing
- Smooth hover and active state transitions
- Responsive typography and spacing
This refactored architecture makes the codebase more maintainable, reusable, and follows Astro's component-first approach.