Hello, everyone! I wish to know why my astro markdown blog is like this. It seems to have two headers and two footers, but I just do as the tutorial. Relavant codes are below:
#Wish some help for Astro!
20 messages · Page 1 of 1 (latest)
Hi. Could you show your footer component?
ok, it's like this:
and the Social.astro:
It seems that My codes are the same as the tutorial
@compact karma upload your code to a github repo
String search across files for “<SocialSearch”
This is the tutorial repo you are following and it works fine
So I'm wondering if 1: you're code isn't actually the same, or 2: maybe theres some package versions mismatching/out of date on your project or the astro project.
yeah i found it
you're code is wrong
This is your code:
---
import BaseLayout from './BaseLayout.astro';
const {frontmatter} = Astro.props;
---
<BaseLayout pageTitle={frontmatter.title}>
<p>Published on: {frontmatter.pubDate.slice(0, 10)}</p>
<p><em>{frontmatter.description}</em></p>
<p>Written by: {frontmatter.author}</p>
<img src={frontmatter.image.url} width="300" alt={frontmatter.image.alt} />
<slot />
<BaseLayout />
In MarkdownPostLayout.astro
Last line
youre welcome