feat: Add tag classes when rendering page (#395)

This commit is contained in:
Rainey
2023-04-20 20:12:11 +01:00
committed by GitHub
parent 129822d08d
commit fda0f1d6c7
+4 -1
View File
@@ -103,7 +103,10 @@ export const SiteLayout: React.FC<SiteLayoutProps> = ({
)}
{site.data && <SiteHeader site={site.data} />}
<div
className={`xlog-post-id-${page.data?.id} max-w-screen-md mx-auto px-5 pt-12 relative`}
className={cn(
`xlog-post-id-${page.data?.id} max-w-screen-md mx-auto px-5 pt-12 relative`,
page.data?.tags?.map((tag) => `xlog-post-tag-${tag}`),
)}
>
{children}
</div>