Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

License

NotificationsYou must be signed in to change notification settings

GordonBeeming/personal-recipes

Repository files navigation

A personal recipe website built with React, Vite, TypeScript, and Tailwind CSS, powered byTina CMS for content management.

🚀 Quick Start

Prerequisites

  • Node.js 20+
  • npm or pnpm

Installation

# Install dependenciesnpm install# Start development server (recommended - fast and simple)npm run dev:prod# Or start with Tina CMS admin (requires Tina Cloud setup)npm run dev

Visithttp://localhost:5000

💡 Tip: Usenpm run dev:prod for regular development. Only usenpm run dev if you need the CMS admin interface at/admin.

⚠️ Troubleshooting

Getting 403 Forbidden Error?

If you see a 403 error when runningnpm run dev, it's because Tina CMS is trying to authenticate without valid credentials.

Quick Fix: Usenpm run dev:prod instead - it runs the app without Tina CMS (faster and no authentication needed).

See403 Error Fix Guide for details.

📝 Content Management with Tina CMS

This project uses Tina CMS for managing recipes. You can edit content visually through the admin interface.

Image Guidelines

For optimal performance and page load times, please follow these image size recommendations:

Recommended Image Sizes

Image TypeDimensionsMax File SizeUsage
Hero Image1200×675px (16:9)200 KBRecipe detail page header
Thumbnail Image600×338px (16:9)100 KBRecipe cards on home page
Gallery Images800×800px (1:1)150 KB eachRecipe photo gallery

Image Optimization Tips

  • Format:WebP recommended for best compression (25-35% smaller than JPEG)
    • WebP: Best choice for all recipe photos (smaller files, great quality)
    • JPEG: Alternative if WebP conversion isn't available
    • PNG: Only for graphics with transparency (logos, icons)
  • Compression: Use tools likeSquoosh orTinyPNG
    • Squoosh (recommended): Convert to WebP with quality 75-85%
    • TinyPNG: Also supports WebP conversion
    • ImageOptim (Mac): Batch processing for multiple images
  • Aspect Ratios:
    • Hero/Thumbnail: 16:9 (landscape)
    • Gallery: 1:1 (square) or 4:3 (flexible)
  • File Names: Use descriptive, lowercase names with hyphens (e.g.,beef-curry-hero.webp)

Example File Sizes (with WebP)

  • Hero image (1200×675px): ~80-120 KB (vs 200+ KB JPEG)
  • Thumbnail (600×338px): ~40-60 KB (vs 100+ KB JPEG)
  • Gallery (800×800px): ~60-100 KB (vs 150+ KB JPEG)

Lightbox Behavior

Gallery images open in a lightbox with these features:

  • Max display size: 80% viewport height, 90% viewport width (max 1200px wide)
  • Semi-transparent background (80% opacity) - click outside to close
  • Keyboard navigation: Arrow keys to navigate, Escape to close
  • Responsive: Adapts to screen size automatically

Setup Tina Cloud (Required for Production)

For complete setup instructions, seeTina Cloud Setup Guide.

Quick overview:

  1. Create account athttps://app.tina.io/
  2. Create a project and get your credentials
  3. Add GitHub secrets:NEXT_PUBLIC_TINA_CLIENT_ID andTINA_TOKEN
  4. Deploy - admin will be available at/admin

Local Development with CMS

# 1. Copy environment templatecp .env.example .env# 2. Add your Tina Cloud credentials to .env# 3. Start dev server with CMSnpm run dev# 4. Access admin at http://localhost:5173/admin

🛠️ Development

Available Scripts

  • npm run dev:prod -Recommended: Start Vite dev server (fast, no CMS)
  • npm run dev - Start Vite + Tina CMS (requires Tina Cloud credentials)
  • npm run build - Build for production (requires Tina Cloud credentials)
  • npm run build:local - Build without Tina Cloud (faster)
  • npm run lint - Run ESLint
  • npm run preview - Preview production build

Project Structure

├── content/recipes/      # Recipe markdown files (managed by Tina)├── src/                  # React application source│   ├── components/       # Reusable UI components│   ├── pages/           # Page components│   ├── hooks/           # Custom React hooks│   └── utils/           # Utility functions├── tina/                # Tina CMS configuration│   └── config.ts        # Content schema├── public/              # Static assets└── docs/                # Project documentation

🧪 Testing

Tests have been removed from this project in favor of manual testing. See the development workflow in the documentation for testing guidelines.

📚 Documentation

🚢 Deployment

This project is configured for GitHub Pages deployment:

  1. Push tomain branch
  2. GitHub Actions automatically builds and deploys
  3. Site available at your GitHub Pages URL
  4. Admin panel available at/admin

🎨 Tech Stack

  • Frontend: React 19, TypeScript, Tailwind CSS 4
  • Build Tool: Vite 6
  • CMS: Tina CMS (cloud-hosted)
  • UI Components: Radix UI, shadcn/ui patterns
  • State Management: TanStack Query
  • Routing: React Router
  • Markdown: React Markdown, Marked

📄 License

MIT License - See LICENSE file for details


Built with ❤️ using GitHub Spark and Tina CMS

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp