California Motorcycle Accident Information & Resource Platform
Educational information and resources for motorcycle accident victims in California.
Domain: CaliforniaMotorcycleAccidents.com
Purpose: Educational legal information platform for motorcycle accident victims in California
Contact: salatrir@gmail.com
| Route | Description |
|---|---|
/ |
Home – stats, resources overview, lead capture |
/accident-guide |
Step-by-step post-accident guide |
/injury-information |
Injury types, symptoms, recovery |
/insurance-guide |
Coverage types, claims process, settlements |
/california-laws |
Helmet, lane splitting, insurance, reporting |
/compensation |
Compensation categories (educational) |
/checklist |
Interactive accident checklist |
/blog |
Article listing |
/blog/[slug] |
Individual article |
/contact |
Contact form |
/es |
Spanish-language home |
/privacy |
Privacy policy |
/terms |
Terms of use |
# Clone the repository
git clone https://github.com/yourusername/california-motorcycle-accidents.git
cd california-motorcycle-accidents
# Install dependencies
npm install
# Start local development server
npm run dev
# → http://localhost:3000
# Build for production
npm run build
# Preview production build
npm start
Create .github/workflows/deploy.yml:
name: Deploy to GitHub Pages
on:
push:
branches: [main]
permissions:
contents: read
pages: write
id-token: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: $
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run build
- uses: actions/configure-pages@v4
- uses: actions/upload-pages-artifact@v3
with:
path: ./out
- uses: actions/deploy-pages@v4
id: deployment
In next.config.js, if using a custom domain, no changes needed.
If deploying to username.github.io/repo-name, add:
basePath: '/repo-name',
npm run build
# Drag the /out folder to Netlify drop zone at netlify.com/drop
npm install -g netlify-cli
npm run build
netlify deploy --prod --dir=out
npm run buildout[build]
command = "npm run build"
publish = "out"
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
npm install -g vercel
vercel --prod
Note: For Vercel deployment, remove
output: 'export'fromnext.config.jsto use Vercel’s native Next.js runtime with SSR/ISR capabilities.
Edit src/lib/seo.ts:
export const SITE_URL = 'https://californiamotorcycleaccidents.com'
Edit src/app/layout.tsx → metadata object:
metadataBase – your domaintitle.default – site namedescription – site-wide descriptionverification.google – paste your Google Search Console verification codesrc/app/layout.tsx at verification: { google: 'YOUR_CODE' }After deploying, submit:
https://californiamotorcycleaccidents.com/sitemap.xml
to Google Search Console and Bing Webmaster Tools.
Each page exports its own metadata object. Edit the title and description in each page file under src/app/*/page.tsx.
src/app/layout.tsxsrc/app/page.tsx (home) and src/app/california-laws/page.tsxsrc/app/blog/[slug]/page.tsxsrc/app/accident-guide/page.tsxAll page content is in the page files:
src/app/page.tsx → Home page
src/app/accident-guide/page.tsx → Accident guide
src/app/injury-information/page.tsx → Injury center
src/app/insurance-guide/page.tsx → Insurance guide
src/app/california-laws/page.tsx → CA laws
src/app/compensation/page.tsx → Compensation
src/app/checklist/ChecklistClient.tsx → Checklist items
Open src/app/checklist/ChecklistClient.tsx and modify the sections array:
const sections = [
{
id: 'scene',
title: 'At the Scene',
color: 'border-red-400',
items: [
{ id: 'call-911', text: 'Your custom text here' },
// ...
],
},
]
In src/app/page.tsx, find the <StatCard> components and update values:
<StatCard value="15,000+" label="Crashes per year" note="Annual CA average" />
src/components/layout/Header.tsx → navLinks array
src/components/layout/Footer.tsx → footerLinks object
Search the project for salatrir@gmail.com and replace with your preferred email.
npm install @next/mdx @mdx-js/loader @mdx-js/react
Create src/content/blog/your-article-slug.mdx
src/app/blog/[slug]/page.tsx to read MDX files dynamicallyPopular options:
src/lib/articleSeeds.ts contains structured data for 50 seed articles across all 6 categories (representing the planned 300). Use these slugs and metadata to generate content programmatically or with an AI writing tool.
Each new article should include:
export const metadata: Metadata = {
title: 'Your Article Title – CaliforniaMotorcycleAccidents.com',
description: 'Your 150-160 character description with primary keyword.',
alternates: { canonical: 'https://californiamotorcycleaccidents.com/blog/your-slug' },
}
And include the Article schema JSON-LD block.
/public/images/<Image> component (note: requires unoptimized: true for static export)Add to netlify.toml:
[[headers]]
for = "/static/*"
[headers.values]
Cache-Control = "public, max-age=31536000, immutable"
[[headers]]
for = "/*.html"
[headers.values]
Cache-Control = "public, max-age=0, must-revalidate"
Vercel handles this automatically for Next.js projects.
The LeadForm and ContactForm components currently simulate submission. Connect them to a real backend:
Option A: Formspree (simplest)
const response = await fetch('https://formspree.io/f/YOUR_FORM_ID', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(form),
})
Option B: ConvertKit / Mailchimp (newsletter) Replace the simulated submit with your email service API call.
Option C: Custom API Route (Vercel/Netlify)
Create src/app/api/contact/route.ts with your email logic.
For immediate email alerts on form submissions:
src/app/api/contact/route.tssalatrir@gmail.comDark mode is enabled automatically based on the user’s OS preference and can be toggled via the moon/sun icon in the header. The preference is saved in localStorage.
To change the default to dark:
// src/components/layout/ThemeProvider.tsx
const initial = saved ?? 'dark' // change 'light' to 'dark'
The Spanish home page is at /es. To expand Spanish support:
src/app/es/hreflang tags in each page’s metadata:
alternates: {
languages: {
'en': 'https://californiamotorcycleaccidents.com/accident-guide',
'es': 'https://californiamotorcycleaccidents.com/es/guia-accidente',
},
},
next-intl for full i18n supportThis is critical. Every page must maintain the educational disclaimer. Do not:
The disclaimer is embedded in:
src/components/ui/DisclaimerBanner.tsx (page-level)src/components/layout/Footer.tsx (site-wide)src/app/contact/ContactForm.tsx (form-level)src/app/terms/page.tsx (terms page)california-motorcycle-accidents/
├── public/
│ ├── manifest.json # PWA manifest
│ ├── icons/ # App icons (add your own)
│ └── images/ # Site images (add your own)
├── src/
│ ├── app/
│ │ ├── layout.tsx # Root layout + global SEO
│ │ ├── page.tsx # Home page
│ │ ├── sitemap.ts # Auto-generated sitemap
│ │ ├── robots.ts # robots.txt
│ │ ├── not-found.tsx # 404 page
│ │ ├── accident-guide/
│ │ ├── injury-information/
│ │ ├── insurance-guide/
│ │ ├── california-laws/
│ │ ├── compensation/
│ │ ├── checklist/
│ │ ├── blog/
│ │ ├── contact/
│ │ ├── es/ # Spanish
│ │ ├── privacy/
│ │ └── terms/
│ ├── components/
│ │ ├── layout/
│ │ │ ├── Header.tsx
│ │ │ ├── Footer.tsx
│ │ │ └── ThemeProvider.tsx
│ │ └── ui/
│ │ ├── StatCard.tsx
│ │ ├── DisclaimerBanner.tsx
│ │ ├── LeadForm.tsx
│ │ └── PageHero.tsx
│ ├── lib/
│ │ ├── seo.ts # SEO helpers
│ │ └── articleSeeds.ts # 50 article seed definitions
│ └── styles/
│ └── globals.css # Global Tailwind styles
├── next.config.js
├── tailwind.config.ts
├── tsconfig.json
└── README.md
Copyright © 2026 CaliforniaMotorcycleAccidents.com. All rights reserved.
Content is for educational purposes only. Nothing constitutes legal advice.