refactor: renamed "pageName" to "pageTags"

This commit is contained in:
2024-08-03 03:20:26 +02:00
parent 1509984afb
commit 27317b38b1
12 changed files with 22 additions and 14 deletions
+11 -3
View File
@@ -7,10 +7,18 @@ import '@fontsource/source-code-pro/latin.css'
import '@fontsource/space-mono/latin.css'
import '@fontsource/iosevka/latin.css'
import '../styles/main.scss'
const { title, description, thumbnail, pageName } = Astro.props
type Props = {
title: string
description: string
thumbnail: string
/** Tags for the page, used for styling */
pageTags: string | string[]
}
const { title, description, thumbnail, pageTags } = Astro.props
---
<!doctype html>
@@ -47,7 +55,7 @@ const { title, description, thumbnail, pageName } = Astro.props
<title>{title}</title>
</head>
<body class:list={Array.isArray(pageName) ? pageName : [pageName]}>
<body class:list={typeof pageTags === 'string' ? [pageTags] : pageTags}>
<slot />
</body>
</html>