Skip to content

Commit

Permalink
init refactor Hero.astro
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-xzq committed Aug 23, 2024
1 parent a13d068 commit 5699743
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ export default defineConfig({
// src: "./src/assets/hero-logo.svg",
src: "/public/logo.svg",
},
components: {
Hero: "@/components/Hero.astro",
},
favicon: "/logo.svg",
sidebar: [
{
Expand Down
11 changes: 11 additions & 0 deletions src/components/Hero.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
import type { Props } from "@astrojs/starlight/props";
import Default from "@astrojs/starlight/components/Hero.astro";
const frontmatter = Astro.props.entry.data;
const actions = frontmatter.hero.actions;
---

<pre>{JSON.stringify(actions)}</pre>
<Default {...Astro.props}><slot /></Default>

0 comments on commit 5699743

Please sign in to comment.