#Wish some help for Astro!

20 messages · Page 1 of 1 (latest)

compact karma
#

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:

sudden obsidian
#

Hi. Could you show your footer component?

compact karma
compact karma
compact karma
#

It seems that My codes are the same as the tutorial

heavy wagon
#

@compact karma upload your code to a github repo

blissful mason
#

String search across files for “<SocialSearch”

compact karma
heavy wagon
#

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

compact karma
#

OMG

#

Thank you pretty much!

heavy wagon
#

youre welcome