Skip to content

Commit b6c3455

Browse files
committed
refactor: update root layout
1 parent 3904be8 commit b6c3455

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/layouts/RootLayout.astro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import NpmPackageSearch from "../components/NpmPackageSearch.svelte";
55
import "../styles/global.css";
66
import "../styles/shiki.css";
77
8-
type Props = {
8+
interface Props {
99
title: string;
1010
description: string;
11-
};
11+
}
1212
13-
const { title: t, description } = Astro.props;
14-
const title = Astro.url.pathname === "/" ? "jsDocs.io" : `${t} - jsDocs.io`;
13+
const title = Astro.url.pathname === "/" ? "jsDocs.io" : `${Astro.props.title} - jsDocs.io`;
14+
const { description } = Astro.props;
1515
const canonicalUrl = new URL(Astro.url.pathname, Astro.site);
1616
const ogImageUrl = new URL("og.jpg", Astro.site); // TODO: add image
1717
const ogImageAlt = "Social image for jsDocs.io";

0 commit comments

Comments
 (0)