Skip to content

Commit

Permalink
fix: oh god more slugs. they're everywhere!
Browse files Browse the repository at this point in the history
  • Loading branch information
mbifulco committed Feb 16, 2025
1 parent 56f80a5 commit 1772a97
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/Post/FullPost.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const FullPost: React.FC<FullPostProps> = ({ post, series }) => {
coverImagePublicId,
date,
excerpt,
path,
slug,
podcastUrl,
tags,
title,
Expand All @@ -58,7 +58,7 @@ const FullPost: React.FC<FullPostProps> = ({ post, series }) => {
let coverContainer: React.ReactNode = (
<Image
className={'mb-4 ml-0 rounded-lg object-cover object-center shadow'}
publicId={coverImagePublicId || `posts/${path}/cover`}
publicId={coverImagePublicId || `posts/${slug}/cover`}
alt={excerpt}
loading="eager"
priority
Expand Down
6 changes: 3 additions & 3 deletions src/components/Post/PostSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ type PostSummaryProps = {
const PostSummary: React.FC<PostSummaryProps> = ({ post, eager = false }) => {
const { frontmatter } = post;

const { coverImagePublicId, date, excerpt, path, title } = frontmatter;
const { coverImagePublicId, date, excerpt, slug, title } = frontmatter;

const postPath = `/posts/${path}`;
const postPath = `/posts/${slug}`;

const coverContainer = (
<Link href={postPath}>
<Image
className={clsxm(
'-mx-2 mb-4 object-cover object-center shadow sm:mx-0 sm:rounded-lg'
)}
publicId={coverImagePublicId || `posts/${path}/cover`}
publicId={coverImagePublicId || `posts/${slug}/cover`}
alt={excerpt || title}
height={630}
width={1200}
Expand Down

0 comments on commit 1772a97

Please sign in to comment.