Skip to content

Commit

Permalink
fix: support title for normal pages and markdown pages at same time
Browse files Browse the repository at this point in the history
  • Loading branch information
gregdan3 committed Jul 13, 2024
1 parent 8b75dbe commit 5bdbf1b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/layouts/Layout.astro
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
---
interface Props {
title: string;
frontmatter: any;
// TODO: what is the type of this thing
}
let { title } = Astro.props;
if (Astro.props.frontmatter?.title) {
title = Astro.props.frontmatter?.title;
}
const { title } = Astro.props;
import { BASE_URL } from '@utils/constants';
---
Expand Down

0 comments on commit 5bdbf1b

Please sign in to comment.