{"version":3,"file":"index-CFWv_5yC.js","sources":["../../../app/components/series-card.tsx","../../../app/routes/series_+/index.tsx"],"sourcesContent":["import { Link } from '@remix-run/react'\nimport { getImageBuilder, getImgProps } from '~/images.tsx'\nimport { useRootData } from '~/utils/use-root-data.ts'\nimport { BlurrableImage } from './blurrable-image.tsx'\nimport { ClipboardCopyButton } from './clipboard-copy-button.tsx'\nimport { MissingSomething } from './kifs.tsx'\nimport { H3 } from './typography.tsx'\n\nfunction SeriesCard({\n series: { title, bannerCloudinaryId, slug },\n}: {\n series: {\n id: string\n title: string\n slug: string\n bannerCloudinaryId?: string\n }\n}) {\n const { requestInfo } = useRootData()\n const permalink = `${requestInfo.origin}/series/${slug}`\n\n return (\n
\n \n {bannerCloudinaryId ? (\n \n }\n />\n ) : (\n
\n
\n \n
\n
\n )}\n

\n {title}\n

\n \n\n \n
\n )\n}\n\nexport { SeriesCard }\n","import slugify from 'slugify'\nimport { flatten, uniqBy } from '~/utils/cjs/lodash.js'\nimport { markdownToHtmlUnwrapped } from '~/utils/markdown.server.ts'\nimport { getBlogMdxListItems } from '~/utils/mdx.server.ts'\nimport { json, type LoaderFunction } from '@remix-run/router'\nimport { useLoaderData } from '@remix-run/react'\nimport { Grid } from '~/components/grid.tsx'\nimport { HeroSection } from '~/components/sections/hero-section.tsx'\nimport { type MetaFunction } from '@remix-run/node'\nimport { type RootLoaderType } from '~/root.tsx'\nimport { getSocialMetas } from '~/utils/seo.ts'\nimport { getSocialImageWithPreTitle, images } from '~/images.tsx'\nimport { getUrl, getDisplayUrl } from '~/utils/misc.tsx'\nimport clsx from 'clsx'\nimport { SeriesCard } from '~/components/series-card.tsx'\nimport { type MdxPage } from '~/types.ts'\n\ntype LoaderData = {\n posts: Array<{ title: string; descriptionHTML: string; slug: string }>\n series: NonNullable\n}\n\nexport const loader: LoaderFunction = async ({ request }) => {\n const posts = await getBlogMdxListItems({ request }).then(allPosts =>\n Promise.all(\n allPosts\n .filter(p => !p.frontmatter.draft)\n .map(async p => ({\n title: p.frontmatter.title ?? 'Untitled',\n descriptionHTML: await markdownToHtmlUnwrapped(\n p.frontmatter.description ?? 'No description',\n ),\n slug: p.slug,\n series: p.frontmatter.series || [],\n })),\n ),\n )\n\n const allSeries = flatten(posts.map(post => post.series))\n const series = uniqBy(allSeries, 'id').map(item => ({\n ...item,\n slug: slugify(item.title, { lower: true }),\n }))\n\n const data: LoaderData = { posts, series }\n\n return json(data, {\n headers: {\n 'Cache-Control': 'private, max-age=3600',\n Vary: 'Cookie',\n },\n })\n}\n\nexport const meta: MetaFunction = ({\n matches,\n}) => {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n const requestInfo = matches.find(m => m.id === 'root')?.data.requestInfo\n return getSocialMetas({\n title: 'Series - Vinh Nguyen',\n description:\n 'Explore in-depth series on software development, featuring tutorials, best practices, and guides to enhance your development work.',\n keywords:\n 'Backend Development, Microservices Architecture, Database Management, Software Development, API Design, Server-Side Programming, Microservices Patterns, SQL Databases, NoSQL Databases, Cloud Backend Services, Distributed Systems, Database Optimization, Backend Frameworks, Service-Oriented Architecture, Data Modeling, Backend Scalability, DevOps for Microservices, Database Security, RESTful Services, Backend Integration',\n url: getUrl(requestInfo),\n image: getSocialImageWithPreTitle({\n url: getDisplayUrl(requestInfo),\n featuredImage: images.defaultFeaturedImage.id,\n preTitle: 'Check out my series',\n title: `Explore in-depth series on software development`,\n }),\n })\n}\n\nexport default function Series() {\n const { series } = useLoaderData()\n\n return (\n
\n \n\n \n {series.slice(0, 3).map((item, idx) => (\n = 2,\n })}\n >\n \n
\n ))}\n \n \n )\n}\n"],"names":["SeriesCard","title","bannerCloudinaryId","slug","requestInfo","useRootData","permalink","jsxs","Link","jsx","BlurrableImage","getImgProps","getImageBuilder","MissingSomething","H3","ClipboardCopyButton","meta","matches","find","m","id","data","getSocialMetas","description","keywords","url","getUrl","image","getSocialImageWithPreTitle","getDisplayUrl","featuredImage","images","defaultFeaturedImage","preTitle","Series","series","useLoaderData","children","HeroS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