This GitHub Repository contains the code behind the website of Drew Roberts - DrewRoberts.com
Astro, HTMX, Alpine along with Tailwind CSS & MDX. Access to my Protocol API for form submissions.
A production-ready personal brand website built with the AHA stack (Astro + HTMX + Alpine.js), styled with Tailwind CSS 4.
- Astro β Static site generator with server-side rendering for API routes
- HTMX β Partial page updates without client-side JavaScript frameworks
- Alpine.js β Lightweight reactivity for UI interactions
- Tailwind CSS 4 β Utility-first CSS with custom theme configuration
- Node.js 18+
- npm or pnpm
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run previewThe dev server runs at http://localhost:4321 by default.
src/
βββ components/ # Reusable Astro components
β βββ Footer.astro # Site footer with navigation
β βββ Hero.astro # Homepage hero section
β βββ Pillars.astro # Value propositions
β βββ FeaturedSections.astro # Links to main sections
β βββ CallToAction.astro # CTA block
β βββ PrinciplesAccordion.astro # Alpine.js accordion
β βββ ResourceFilter.astro # HTMX filter tabs
β βββ ResourceList.astro # Resource cards
βββ layouts/
β βββ BaseLayout.astro # Main HTML template with SEO
βββ pages/
β βββ index.astro # Homepage
β βββ architecture.astro # Approach/methodology page
β βββ downloads.astro # Resources with HTMX filtering
β βββ privacy.astro # Privacy policy
β βββ docs/
β β βββ index.astro # Guides hub
β β βββ for-clients.astro
β β βββ for-collaborators.astro
β βββ api/
β βββ resources.astro # HTMX endpoint
βββ styles/
βββ global.css # Tailwind config & custom styles
Returns filtered resource cards as an HTML partial.
Query Parameters:
categoryβ Filter resources by categoryallβ All resources (default)documentsβ PDF documents (resume, bio)mediaβ Media kit (photos, logos, guidelines)linksβ External links (social, booking)
Example:
GET /api/resources?category=documents
Returns HTML fragment that replaces the #resource-list container via HTMX swap.
How it works:
- User clicks a filter tab on
/downloads - HTMX intercepts the click and makes GET request to
/api/resources?category=X - Server renders only the
ResourceListcomponent with filtered data - HTMX swaps the response into
#resource-listcontainer - No full page reload, no client-side state management
Expandable content sections on the Approach page:
- State:
openItem(string | null) - Single-open behavior (opening one closes others)
- Animated expand/collapse with
x-collapseplugin - ARIA attributes for accessibility
The site uses a custom Tailwind theme defined in src/styles/global.css with the @theme directive:
@theme {
--color-bg-deep: #0a0b0d;
--color-bg-primary: #121418;
--color-bg-elevated: #1a1d23;
--color-bg-surface: #22262e;
--color-steel: #3d4654;
--color-accent: #d97706;
--color-accent-bright: #f59e0b;
/* ... see global.css for full list */
}Colors are available as utility classes:
bg-bg-deep,bg-bg-elevated,bg-bg-surfacetext-text-primary,text-text-secondary,text-text-mutedborder-steel,border-accent
Reusable component classes defined in @layer components:
.btn,.btn-primary,.btn-secondaryβ Button styles.container,.container-narrowβ Layout containers.sectionβ Section padding.cardβ Card component.tag,.labelβ Text utilities
Custom fonts via CSS variables:
font-displayβ Courier Prime (monospace headings)font-bodyβ System font stackfont-monoβ Code/labels font
- Edit
Hero.astroprops for name, tagline, description - Modify
Pillars.astrofor value propositions - Update
FeaturedSections.astrofor section links
- The default name is "John Doe" - search and replace throughout:
src/components/Hero.astro(name prop default)src/components/Footer.astro(logo text)src/pages/*.astro(page titles)
- Both files contain the
allResourcesarray - Keep them in sync when adding/removing resources
- Categories:
documents,media,links
- Edit content directly in Astro files
- Use Tailwind classes for styling
- Footer nav links:
src/components/Footer.astro - SEO defaults:
src/layouts/BaseLayout.astro
Each page includes:
- Custom
<title>and<meta name="description"> - Open Graph tags (og:title, og:description, og:image)
- Twitter Card tags
- Canonical URL
- Sitemap at
/sitemap.xml - Robots.txt at root
To customize:
- Update
siteinastro.config.mjsfor canonical URLs - Edit page-level props in each
.astrofile - Replace placeholder social/OG images in
public/
npm run buildOutput is in dist/ folder. The site uses server-side rendering (SSR) for the API endpoint, so deploy to a platform that supports Node.js (Vercel, Netlify Functions, Cloudflare Workers, etc.).
For static export (no HTMX filtering), change astro.config.mjs:
export default defineConfig({
output: 'static', // instead of 'server'
});- Modern browsers (Chrome, Firefox, Safari, Edge)
- Progressive enhancement for older browsers
- Mobile-first responsive design
- AA contrast accessibility compliance
Personal use. Modify and deploy as your own brand site.