Your website is now configured to automatically fetch latest videos from your YouTube channel (@DaddyJSON)!
- Go to Google Cloud Console
- Create a new project or select existing one
- Enable YouTube Data API v3:
- Go to "APIs & Services" > "Library"
- Search for "YouTube Data API v3"
- Click "Enable"
- Create API Key:
- Go to "APIs & Services" > "Credentials"
- Click "Create Credentials" > "API Key"
- Copy your API key
Create a file named .env.local in your project root and add:
YOUTUBE_API_KEY=your_api_key_here
YOUTUBE_CHANNEL_ID=UCxkIzPnMxVVYr7FXLna5KNQReplace your_api_key_here with your actual API key from step 1.
npm run dev- Automatic Updates: Latest 3 videos from your channel automatically appear
- Fallback: If API fails, shows your manually set videos
- Smart Titles: Long video titles are automatically shortened
- Loading States: Nice skeleton loaders while fetching
- API quota: 10,000 units/day (each page load uses ~3 units)
- Videos update on each page refresh
- Channel ID for DaddyJSON is already configured
- Works on homepage latest videos section
.env.localis gitignored (API key stays private)- Never commit your API key to GitHub
- Use
.env.local.exampleas template