Skip to content

Commit

Permalink
fix: use absolute paths
Browse files Browse the repository at this point in the history
  • Loading branch information
DerYeger committed Jan 13, 2023
1 parent 137bc66 commit b8ed7bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/blog.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('Blog', () => {

it('can navigate to a post', () => {
cy.contains('Masonry layout').click({ force: true })
cy.location('pathname').should('eq', '/blog/vue-masonry-wall')
cy.location('pathname').should('eq', '/blog/vue-masonry-wall/')
})

it('shows the details of a blog post', () => {
Expand Down
6 changes: 5 additions & 1 deletion src/pages/blog.astro
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ const posts = (await getCollection('blog')).sort(
const { remarkPluginFrontmatter } = await post.render()
return (
<li class="card card-hover overflow-hidden">
<a href={post.slug} rel="prefetch" class="block no-underline">
<a
href={`/blog/${post.slug}/`}
rel="prefetch"
class="block no-underline"
>
{post.data.heroImage && (
<Image
class="w-full h-[100px] object-cover"
Expand Down

0 comments on commit b8ed7bc

Please sign in to comment.