Skip to content

Commit

Permalink
remove trailing forward slash from Astro's pathname
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewDTR committed Oct 10, 2024
1 parent 9e085f6 commit a9b11e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/layouts/Blog.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import BaseLayout from "./BaseLayout.astro";
const { frontmatter } = Astro.props;
const hasTags = frontmatter.tags && frontmatter.tags.length > 0;
const imgLink = `${Astro.site.origin}/og/${Astro.url.pathname}.png`;
const imgLink = `${Astro.site.origin}/og${Astro.url.pathname.replace(/\/$/, "")}.png`;
---

<BaseLayout
Expand Down

0 comments on commit a9b11e8

Please sign in to comment.