Skip to content

Commit

Permalink
fix: date and author position
Browse files Browse the repository at this point in the history
  • Loading branch information
o-az committed Jul 25, 2024
1 parent 06b57b6 commit a39c6a4
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions site/src/pages/blog/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ const {
})
// The browser should always check freshness
Astro.response.headers.set("cache-control", "public, max-age=0, must-revalidate")
Astro.response.headers.set(
"cache-control",
"public, max-age=0, must-revalidate"
)
// The CDN should cache for a year, but revalidate if the cache tag changes
Astro.response.headers.set("netlify-cdn-cache-control", "s-maxage=31536000")
Expand Down Expand Up @@ -72,18 +75,7 @@ const { width, height } = coverFields.file.details.image as {
{blogPost.fields.title}
</h1>
</div>
<Image
{width}
{height}
class="my-3"
src={imageUrl}
loading="eager"
alt={coverFields.title}
data-contentful-field-id="cover"
data-contentful-entry-id={entryId}
{...ContentfulLivePreview.getProps({ entryId, fieldId: "cover" })}
/>
<div class="flex gap-x-3">
<div class="flex gap-x-3 mt-1.5">
<time
class="text-lg text-gray-400"
data-contentful-field-id="date"
Expand All @@ -103,6 +95,17 @@ const { width, height } = coverFields.file.details.image as {
{blogPost.fields.author}
</p>
</div>
<Image
{width}
{height}
class="my-3"
src={imageUrl}
loading="eager"
alt={coverFields.title}
data-contentful-field-id="cover"
data-contentful-entry-id={entryId}
{...ContentfulLivePreview.getProps({ entryId, fieldId: "cover" })}
/>
<p>
<em
class="hidden"
Expand Down

0 comments on commit a39c6a4

Please sign in to comment.