- Node.js 18+
- npm, pnpm, or yarn
Use the Astro CLI to create a new project with the Virex template:
npm create astro@latest -- --template erlandv/virexFollow the prompts to:
- Name your project
- Choose your package manager (npm, pnpm, or yarn)
- Optionally initialize a git repository
- Optionally install dependencies
Once complete, navigate to your project and start the development server:
cd your-project-name
npm run devYour site will be available at http://localhost:4321.
If you want to contribute to the theme or need the full git history:
# Clone the repository
git clone https://github.com/erlandv/virex.git
cd virex
# Install dependencies
npm install
# Start development server
npm run devThe theme uses several path aliases for cleaner imports:
// Base alias
import { siteConfig } from '@/config';
import { formatDate } from '@/lib/utils';
import MarketingLayout from '@/layouts/MarketingLayout.astro';
// Component aliases
import Header from '@layout/Header.astro';
import Hero from '@sections/marketing/Hero.astro';
import ContactForm from '@forms/ContactForm.astro';
import ThemeToggle from '@ui/ThemeToggle.astro';| Alias | Path |
|---|---|
@/* |
src/* |
@components/* |
src/components/* |
@sections/* |
src/components/sections/* |
@ui/* |
src/components/ui/* |
@forms/* |
src/components/forms/* |
@layout/* |
src/components/layout/* |
@dashboard/* |
src/components/dashboard/* |
@dashboard-ui/* |
src/components/dashboard-ui/* |
This theme includes sample content using "Virex" as a fictional SaaS product. Before launching your site, you'll want to replace:
- Site configuration in
src/config/(name, description, URLs, contact info) - Blog posts in
src/content/blog/ - Documentation in
src/content/docs/ - Changelog entries in
src/content/changelog/ - Testimonials in
src/content/testimonials/ - Logo and images in
public/ - Dashboard data in
src/lib/dashboard-data.ts
You can delete the sample content files and create your own, or edit them as a starting point.
To start fresh with your own content:
- Delete all files in
src/content/blog/ - Delete all files in
src/content/changelog/ - Delete all files in
src/content/testimonials/ - Keep or modify files in
src/content/docs/for your own documentation - Replace images in
public/images/(blog, team, testimonials, logos) - Update
public/logo.svgandpublic/favicon.svgwith your brand - Replace
public/images/og-image.pngwith your Open Graph image (1200x630px) - Replace sample dashboard data in
src/lib/dashboard-data.tswith real API calls
src/
├── components/
│ ├── common/ # SEO, OptimizedImage
│ ├── dashboard/ # Dashboard layout components
│ │ ├── Breadcrumbs.astro # Breadcrumb navigation
│ │ ├── DashboardShell.astro # Main dashboard shell
│ │ ├── MobileNav.astro # Mobile navigation drawer
│ │ ├── Sidebar.astro # Dashboard sidebar
│ │ ├── TopNav.astro # Top navigation bar
│ │ └── UserMenu.astro # User dropdown menu
│ ├── dashboard-ui/ # Reusable dashboard UI components
│ │ ├── Card.astro # Content card
│ │ ├── Chart.astro # Chart visualization
│ │ ├── DataTable.astro # Data table with sorting
│ │ ├── EmptyState.astro # Empty state placeholder
│ │ ├── LoadingSkeleton.astro # Loading skeleton
│ │ ├── Modal.astro # Modal dialog
│ │ ├── StatCard.astro # Metric card with trend
│ │ └── Toast.astro # Toast notification
│ ├── error/ # Error page components
│ ├── forms/ # ContactForm, DemoRequestForm, LoginForm, etc.
│ ├── layout/ # Header, Footer, AnnouncementBar
│ ├── sections/
│ │ ├── content/ # PageHeader, ContentSection, FAQSection, VideoEmbed
│ │ ├── marketing/ # Hero, CTA, FeaturesSection, HowItWorks, BentoGrid, etc.
│ │ ├── pricing/ # PricingTable, ComparisonTable, SecurityBadges, TrustBadges
│ │ ├── product/ # ChangelogList, RoadmapTimeline, StatusOverview
│ │ ├── social-proof/ # TestimonialsSection, CaseStudyCard, StatsSection
│ │ └── team/ # TeamSection, JobListings, ValuesSection
│ └── ui/ # ThemeToggle, Pagination
├── config/ # Site configuration
│ ├── index.ts # Main export (imports all configs)
│ ├── site.ts # Site metadata, social links
│ ├── contact.ts # Contact information
│ ├── navigation.ts # Header and footer navigation
│ ├── dashboard-navigation.ts # Dashboard sidebar navigation
│ ├── features.ts # Feature flags
│ └── content.ts # Announcement bar, newsletter strings
├── content/ # Content collections (Markdown/MDX)
│ ├── blog/ # Blog posts
│ ├── docs/ # Documentation
│ ├── changelog/ # Version history
│ └── testimonials/ # Customer quotes
├── layouts/ # Page layouts
│ ├── BaseLayout.astro # HTML shell
│ ├── MarketingLayout.astro # Marketing pages
│ ├── BlogLayout.astro # Blog posts
│ ├── DocsLayout.astro # Documentation
│ ├── DashboardLayout.astro # Dashboard pages
│ └── ErrorLayout.astro # Error pages
├── lib/ # Utilities
│ ├── types.ts # TypeScript interfaces
│ ├── utils.ts # Helper functions
│ ├── validation.ts # Form validation
│ └── dashboard-data.ts # Sample data for dashboard
├── pages/ # Route pages
│ ├── blog/ # Blog with pagination and tags
│ ├── dashboard/ # Dashboard pages
│ │ ├── settings/ # Settings pages (profile, team, billing)
│ │ ├── projects/ # Projects pages (list, detail)
│ │ └── index.astro # Dashboard overview
│ ├── docs/ # Documentation pages
│ └── ... # Other pages (index, features, pricing, etc.)
└── styles/
└── global.css # Design tokens and global styles
| File | Purpose |
|---|---|
astro.config.mjs |
Astro configuration and integrations |
src/config/index.ts |
Site branding, navigation, features |
src/styles/global.css |
Design tokens and global styles |
src/content.config.ts |
Content collection schemas |
tsconfig.json |
TypeScript configuration and path aliases |
.env.example |
Environment variables template |
Icon not found error
Make sure you're using the correct icon prefix. Lucide icons use lucide: prefix:
<Icon name="lucide:zap" /> <!-- Correct -->
<Icon name="zap" /> <!-- Wrong -->Dark mode flash on page load
The theme includes inline script in BaseLayout.astro to prevent flash. If you're seeing a flash, ensure the script runs before any content renders.
Build fails with content collection errors
Check that your frontmatter matches the schema in src/content.config.ts. Required fields must be present and dates must be valid.
Path alias not working
Ensure your tsconfig.json includes the path aliases. The theme comes pre-configured with aliases for @/, @components/, @sections/, @ui/, @forms/, and @layout/.