Publish Container / docker (push) Successful in 14m16s
New /nuggets page for the companion show, linked from the Episodes nav dropdown. Hosts (name, role, bio, photo) show in a left column with the episode list on the right — latest episode featured, rest below. Episodes are pulled from an admin-configurable RSS feed URL (empty by default, shows "coming soon" until set) rather than hardcoded like the main show's feed, since the show doesn't have one yet. Everything is editable in /admin under a new Nuggets section: Show Settings (title, tagline, description, podcast art, RSS/platform URLs) and Hosts (add freely; removing a host archives them instead of deleting — kept on record and restorable, never lost). Extracted the RSS item-parsing logic shared with the main show's feed (server/routes/episodes.js) into server/rss-helpers.js so both feeds use the same parser instead of duplicating it. Also fixes the local Vite dev server not proxying /uploads/* to the backend — it was silently serving the SPA shell (200, text/html) instead of the actual file, so any admin-uploaded image (podcast art, host photos, etc.) appeared broken in local dev only. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016Yvx4rPVy2HWe7ubuk3X3J
62 lines
2.1 KiB
TypeScript
62 lines
2.1 KiB
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
VitePWA({
|
|
registerType: 'autoUpdate',
|
|
includeAssets: ['favicon.svg', 'book_icon.png', 'icons.svg'],
|
|
manifest: {
|
|
name: 'Verse by Verse with Nate',
|
|
short_name: 'VBVN',
|
|
description: 'A journey through Scripture — episodes, Q&A, and Bible study.',
|
|
start_url: '/',
|
|
display: 'standalone',
|
|
background_color: '#13120e',
|
|
theme_color: '#13120e',
|
|
icons: [
|
|
{ src: '/pwa-192.png', sizes: '192x192', type: 'image/png' },
|
|
{ src: '/pwa-512.png', sizes: '512x512', type: 'image/png', purpose: 'any maskable' },
|
|
],
|
|
},
|
|
workbox: {
|
|
navigateFallback: '/index.html',
|
|
// Allowlist-only approach: SW only serves index.html for known SPA routes.
|
|
// Everything else (admin-configured redirects, /spotify, /apple, /amazon,
|
|
// feed.xml, robots.txt, etc.) goes to the server so server-side redirects work.
|
|
navigateFallbackAllowlist: [
|
|
/^\/$/, // exact root
|
|
/^\/(start-here|about|contact|resources|thanks|preview|privacy|terms|salvation)(\/.*)?$/,
|
|
/^\/(study|studys|episodes|finished|downloads|subscribe|certificate)(\/.*)?$/,
|
|
/^\/(questions|admin|email|contacts|calendar)(\/.*)?$/,
|
|
],
|
|
runtimeCaching: [
|
|
{
|
|
urlPattern: /^\/api\/(episodes|questions)/,
|
|
handler: 'StaleWhileRevalidate',
|
|
options: { cacheName: 'api-content', expiration: { maxAgeSeconds: 3600 } },
|
|
},
|
|
{
|
|
urlPattern: /\/images\//,
|
|
handler: 'CacheFirst',
|
|
options: { cacheName: 'images', expiration: { maxEntries: 60, maxAgeSeconds: 86400 * 30 } },
|
|
},
|
|
],
|
|
},
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'react-simple-maps': 'react-simple-maps/dist/index.es.js',
|
|
},
|
|
},
|
|
server: {
|
|
proxy: {
|
|
'/api': 'http://localhost:4173',
|
|
'/uploads': 'http://localhost:4173',
|
|
},
|
|
},
|
|
})
|