Comprehensive Site Maintenance Guide
This is your comprehensive guide for maintaining all aspects of your Lane website. This guide covers everything from daily content updates to advanced configuration changes.
Quick Start: Common Tasks
Adding New Content
Blog Posts
- Create a new
.md
or.mdx
file in/src/content/post/
- Include required frontmatter:
--- title: "Your Post Title" description: "Brief description for SEO" publishDate: "2025-07-16" tags: ["tag1", "tag2"] draft: false ---
- Write your content using Markdown
Research Papers
- Create a new
.md
file in/src/content/research/
- Include research-specific frontmatter:
--- title: "Paper Title" description: "Abstract or summary" authors: "You, Co-author Name" paperDate: "2025" status: "working-paper" # or "published", "work-in-progress" type: "paper" publication: "Journal Name (optional)" link: "https://link-to-paper.com" download: "https://download-link.pdf" featured: false tags: ["economics", "research-topic"] ---
Updating Personal Information
All personal/professional information is centralized in /src/site.config.ts
:
export const siteConfig = {
// Basic info
author: "Nathan Lane",
title: "Nathan Lane, PhD",
description: "Nathan Lane, PhD, Economist and Data Scientist",
// Professional info (for SEO/structured data)
jobTitle: "Assistant Professor of Economics",
organization: "University of Oxford",
profileImage: "/headshot.jpg",
twitterHandle: "@straightedge",
orcid: "0000-0003-0884-8418",
// Social profiles
socialProfiles: [
"https://twitter.com/straightedge",
"https://www.linkedin.com/in/drnathanlane/",
"https://github.com/nathanlane",
"https://orcid.org/0000-0003-0884-8418"
],
// Display options
showLogo: false,
showTitle: false,
footerText: "🚀 Astro Theme by Nathan Lane",
};
Updating Homepage Content
Homepage sections are configured in /src/content/homepage/index.yaml
:
showcase:
title: "What I'm Working On"
contentSections:
research:
title: "Recent Papers"
itemCount: 3
viewAllText: "View all research papers"
viewAllUrl: "/research/"
writing:
title: "Recent Writing"
itemCount: 3
viewAllText: "View all writing"
viewAllUrl: "/writing/"
media:
title: "Recent Media"
itemCount: 5
viewAllText: "View all media"
viewAllUrl: "/media/"
Site Structure Overview
Content Collections
/src/content/post/
- Blog posts and articles/src/content/research/
- Research papers and academic work/src/content/projects/
- Project documentation/src/content/writing/
- Creative writing/src/content/note/
- Short notes/thoughts/src/content/series/
- Series metadata for grouping content/src/content/pages/
- Static pages (About, etc.)
Key Configuration Files
/src/site.config.ts
- Main site configuration/src/content.config.ts
- Content collection schemas/astro.config.ts
- Astro framework configuration/tailwind.config.ts
- Tailwind CSS configuration/.env
- Environment variables (API keys, etc.)
Component Locations
/src/components/
- Reusable UI components/src/layouts/
- Page layouts (Base, BlogPost, Series)/src/pages/
- Route pages/src/styles/
- Global CSS and typography
SEO and Structured Data
See the dedicated SEO & Structured Data Maintenance Guide for:
- Updating structured data schemas
- Testing SEO implementations
- Managing meta tags
- Troubleshooting search appearance
Typography System
Font Stack
- Headings: Newsreader (serif)
- Body: IBM Plex Sans
- Code: IBM Plex Mono
Customizing Typography
Typography settings are in:
/src/styles/global.css
- CSS variables and base styles/src/styles/utopia.css
- Fluid type scale/tailwind.config.ts
- Tailwind typography configuration
Media Appearances
Update media appearances in /src/data/media.ts
:
export const mediaData: Record<number, MediaItem[]> = {
2025: [
{
title: "Article Title",
outlet: "Publication Name",
date: "2025-07-16",
type: "article", // or "podcast", "video", "interview"
link: "https://link-to-article.com",
description: "Brief description (optional)"
},
]
};
Development Workflow
Local Development
# Install dependencies
pnpm install
# Start dev server
pnpm dev
# Build for production
pnpm build
# Preview production build
pnpm preview
# Code quality checks
pnpm lint
pnpm format
pnpm check
Git Workflow
- Create feature branch:
git checkout -b feat/your-feature
- Make changes and test locally
- Commit with descriptive message
- Push to GitHub
- Create pull request if using GitHub workflow
Troubleshooting Common Issues
Content Not Appearing
- Check frontmatter is valid (no syntax errors)
- Ensure
draft: false
for published content - Clear build cache:
rm -rf .astro dist
- Restart dev server
Styling Issues
- Check Tailwind classes are correct
- Verify dark mode classes if applicable
- Check browser console for CSS errors
- Use browser dev tools to inspect elements
Build Errors
- Run
pnpm check
for TypeScript errors - Check for missing dependencies
- Verify all imports are correct
- Check console output for specific errors
Advanced Configuration
Adding New Routes
- Create new file in
/src/pages/
- File path becomes URL route
- Use
.astro
for static pages - Can use
.ts
for API routes
Extending Content Collections
- Update schema in
/src/content.config.ts
- Add new collection folder in
/src/content/
- Create corresponding page routes
- Update navigation if needed
Custom Components
- Create component in
/src/components/
- Use
.astro
for static components - Import and use in pages/layouts
- Follow existing naming conventions
Performance Optimization
Image Optimization
- Use Astro’s Image component
- Provide alt text for accessibility
- Use appropriate formats (WebP, AVIF)
- Lazy load non-critical images
Font Loading
- Critical fonts are preloaded
- Use
font-display: swap
- Subset fonts if possible
- Monitor CLS (Cumulative Layout Shift)
Build Optimization
- Use static generation where possible
- Minimize JavaScript usage
- Enable compression
- Use CDN for assets
Backup and Recovery
Regular Backups
- Git commits serve as version control
- GitHub stores complete history
- Consider automated backups of:
- Media files
- Generated content
- Environment variables
Recovery Process
- Clone repository:
git clone [repo-url]
- Install dependencies:
pnpm install
- Restore environment variables
- Build and deploy
Getting Help
Documentation Resources
Project-Specific Guides
Support Channels
- GitHub Issues for bug reports
- Astro Discord for framework questions
- Stack Overflow for general web dev help
Remember: This site is built with maintainability in mind. Most common tasks only require editing content files or configuration, not code changes.