Non-official site for The Life Series Minecraft hardcore survival multiplayer series housing every video www.life-series.online
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix breaking changes after astro upgrade

ghustvn 3ccc7d5f 244f12cb

+31 -20
+13 -13
astro.config.mjs
··· 59 59 site: 'https://www.life-series.online', 60 60 trailingSlash: 'never', 61 61 integrations: [sitemap(), og(), icon()], 62 + fonts: [ 63 + { 64 + provider: fontProviders.fontsource(), 65 + name: 'Nunito', 66 + cssVariable: '--font-nunito', 67 + weights: [500, 800], 68 + styles: ['normal'], 69 + subsets: ['latin'], 70 + fallbacks: ['sans-serif'], 71 + formats: ['woff2'], 72 + display: 'swap', 73 + }, 74 + ], 62 75 experimental: { 63 76 contentIntellisense: true, 64 - fonts: [ 65 - { 66 - provider: fontProviders.fontsource(), 67 - name: 'Nunito', 68 - cssVariable: '--font-nunito', 69 - weights: [500, 800], 70 - styles: ['normal'], 71 - subsets: ['latin'], 72 - fallbacks: ['sans-serif'], 73 - formats: ['woff2'], 74 - display: 'swap', 75 - }, 76 - ], 77 77 }, 78 78 redirects, 79 79 });
+3 -1
src/content.config.ts
··· 1 - import { defineCollection, z } from 'astro:content'; 1 + import { defineCollection } from 'astro:content'; 2 2 import { file } from 'astro/loaders'; 3 + import { z } from 'astro/zod'; 3 4 4 5 const seasons = defineCollection({ 5 6 loader: file('src/data/seasons.json'), 6 7 schema: z.object({ 8 + seasonNumber: z.number(), 7 9 title: z.string(), 8 10 sessionCount: z.number().optional(), 9 11 seo: z.object({
+8
src/data/seasons.json
··· 1 1 [ 2 2 { 3 3 "id": "nice-life", 4 + "seasonNumber": 8, 4 5 "title": "Nice Life", 5 6 "sessionCount": 3, 6 7 "seo": { ··· 184 185 }, 185 186 { 186 187 "id": "past-life", 188 + "seasonNumber": 7, 187 189 "title": "Past Life", 188 190 "sessionCount": 8, 189 191 "seo": { ··· 720 722 }, 721 723 { 722 724 "id": "wild-life", 725 + "seasonNumber": 6, 723 726 "title": "Wild Life", 724 727 "seo": { 725 728 "description": { ··· 1337 1340 }, 1338 1341 { 1339 1342 "id": "secret-life", 1343 + "seasonNumber": 5, 1340 1344 "title": "Secret Life", 1341 1345 "seo": { 1342 1346 "description": { ··· 1984 1988 }, 1985 1989 { 1986 1990 "id": "limited-life", 1991 + "seasonNumber": 4, 1987 1992 "title": "Limited Life", 1988 1993 "seo": { 1989 1994 "description": { ··· 2448 2453 }, 2449 2454 { 2450 2455 "id": "double-life", 2456 + "seasonNumber": 3, 2451 2457 "title": "Double Life", 2452 2458 "seo": { 2453 2459 "description": { ··· 2822 2828 }, 2823 2829 { 2824 2830 "id": "last-life", 2831 + "seasonNumber": 2, 2825 2832 "title": "Last Life", 2826 2833 "seo": { 2827 2834 "description": { ··· 3430 3437 }, 3431 3438 { 3432 3439 "id": "3rd-life", 3440 + "seasonNumber": 1, 3433 3441 "title": "3rd Life", 3434 3442 "seo": { 3435 3443 "description": {
+3 -2
src/layouts/BaseLayout.astro
··· 8 8 interface Props { 9 9 title: string; 10 10 favicon?: string; 11 + optionalJs?: boolean; 11 12 } 12 13 13 - const { title, favicon } = Astro.props; 14 + const { title, favicon, optionalJs } = Astro.props; 14 15 --- 15 16 16 17 <html lang="en"> 17 18 <Head> 18 - <script is:inline>document.documentElement.classList.add('js')</script> 19 + {optionalJs && <script is:inline>document.documentElement.classList.add('js')</script>} 19 20 <meta charset="utf-8" /> 20 21 <meta name="theme-color" content="#d9ebd2" /> 21 22 {favicon
+1 -1
src/pages/index.astro
··· 7 7 import BaseLayout from '@/layouts/BaseLayout.astro'; 8 8 import { getSeasonImage } from '@/utils/images'; 9 9 10 - const seasons = await getCollection('seasons'); 10 + const seasons = (await getCollection('seasons')).sort((a, b) => b.data.seasonNumber.valueOf() - a.data.seasonNumber.valueOf()); 11 11 12 12 const ogTitle = 'The Life Series Minecraft hardcore survival multiplayer series.'; 13 13 const ogDescription = 'Non-official site. Watch all The Life Series member point of views from all seasons.';
+1 -1
src/pages/seasons/[season_id]/[member_name].astro
··· 58 58 const ogImageAlt = `The Life Series logo - ${season.data.title}`; 59 59 --- 60 60 61 - <BaseLayout title={pageTitle} favicon={faviconImage}> 61 + <BaseLayout title={pageTitle} favicon={faviconImage} optionalJs> 62 62 <SEO 63 63 slot="seo" 64 64 title={ogTitle}
+2 -2
src/pages/seasons/[season_id]/sessions/[session_id].astro
··· 27 27 28 28 return sessionNumbers.map((sessionNumber) => { 29 29 return { 30 - params: { season_id: season.id, session_id: sessionNumber }, 30 + params: { season_id: season.id, session_id: String(sessionNumber) }, 31 31 props: { 32 32 season, 33 33 sessionNumber, ··· 52 52 const ogImageAlt = `The Life Series logo - ${season.data.title}`; 53 53 --- 54 54 55 - <BaseLayout title={pageTitle} favicon={faviconImage}> 55 + <BaseLayout title={pageTitle} favicon={faviconImage} optionalJs> 56 56 <SEO 57 57 slot="seo" 58 58 title={ogTitle}