Randy Olson

Dr. Randal S. Olson - Personal Website

A modern, responsive portfolio and blog website built with Next.js, featuring AI research insights, data science content, and professional services. Built with contemporary web development practices for optimal performance and SEO.

πŸš€ Live Site

Visit the live website at randalolson.com

πŸ› οΈ Technology Stack

✨ Features

πŸ—οΈ Project Structure

src/
β”œβ”€β”€ app/                    # Next.js App Router
β”‚   β”œβ”€β”€ blog/              # Blog listing page
β”‚   β”œβ”€β”€ search/            # Search functionality
β”‚   β”œβ”€β”€ resume/            # Resume page
β”‚   β”œβ”€β”€ work-with-me/      # Services page
β”‚   β”œβ”€β”€ [year]/[month]/[day]/[slug]/  # Dynamic blog posts
β”‚   β”œβ”€β”€ layout.tsx         # Root layout
β”‚   β”œβ”€β”€ page.tsx           # Homepage
β”‚   └── globals.css        # Global styles
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ layout/            # Navigation, footer
β”‚   β”œβ”€β”€ ui/                # Reusable UI components
β”‚   └── theme-toggle.tsx   # Theme switching
└── lib/
    β”œβ”€β”€ content.ts         # Content loading utilities
    β”œβ”€β”€ search.ts          # Search functionality
    └── utils.ts           # Helper functions

πŸš€ Development

Prerequisites

Setup

  1. Clone the repository
    git clone https://github.com/rhiever/rhiever.github.io.git
    cd rhiever.github.io
    
  2. Install dependencies
    npm install
    
  3. Start development server
    npm run dev
    
  4. Open browser
    open http://localhost:3000
    

Build for Production

npm run build

This generates a static export in the dist/ directory, ready for deployment.

πŸ“ Content Management

Adding Blog Posts

  1. Create a new markdown file in _posts/ directory
  2. Use YAML frontmatter format:
    ---
    layout: post
    title: "Your Post Title"
    date: 2025-01-15 10:00:00.000000000 -08:00
    description: "Brief description for SEO"
    keywords: "keyword1, keyword2, keyword3"
    categories: ["category1", "category2"]
    tags: ["tag1", "tag2"]
    ---
    
    Your post content in Markdown...
    
  3. Add any images to public/assets/YYYY/MM/ directory
  4. Run npm run build to regenerate static files

Available Content Types

🚒 Deployment

This site is deployed on Railway using static export with the serve package.

Initial Setup

  1. Create Railway Project
    • Log in to Railway
    • Click β€œNew Project” β†’ β€œDeploy from GitHub repo”
    • Connect your GitHub account and select this repository
  2. Automatic Configuration
    • Railway automatically detects the railway.json configuration
    • Build command: npm ci && npm run build
    • Start command: npx serve dist -l $PORT -s
  3. Generate Domain
    • Go to your service β†’ Settings β†’ Networking
    • Click β€œGenerate Domain” to get a *.railway.app URL

Custom Domain Setup

  1. In Railway: Settings β†’ Networking β†’ β€œ+ Custom Domain”
  2. Enter your domain (e.g., randalolson.com)
  3. Railway provides a CNAME record to configure
  4. Add the CNAME record in your DNS provider
  5. Railway automatically provisions SSL certificates

How It Works

Manual/Local Production Testing

# Build the site
npm run build

# Test production serving locally
npm run start:prod

πŸ”§ Configuration

Railway Configuration (railway.json)

The deployment is configured via railway.json:

{
  "build": {
    "builder": "NIXPACKS",
    "buildCommand": "npm ci && npm run build"
  },
  "deploy": {
    "startCommand": "npx serve dist -l ${PORT:-3000} -s",
    "healthcheckPath": "/",
    "restartPolicyType": "ON_FAILURE",
    "restartPolicyMaxRetries": 3
  }
}

Environment Variables

No environment variables required for basic functionality. Railway automatically provides:

Design System

Colors, fonts, and spacing are defined in tailwind.config.ts and src/app/globals.css. The design system supports:

πŸ“Š Performance

πŸ“„ License

Content and code Β© 2025 Dr. Randal S. Olson. All rights reserved.