import type { GetStaticProps, GetStaticPaths, NextPage } from 'next' import { MDXRemote } from 'next-mdx-remote' import date from 'date-and-time' import Giscus from '@giscus/react' import { useTheme } from 'next-themes' import { Head } from 'components/Head' import { Header } from 'components/Header' import type { FooterProps } from 'components/Footer' import { Footer } from 'components/Footer' import type { Post } from 'utils/blog' interface BlogPostPageProps extends FooterProps { post: Post } const BlogPostPage: NextPage = (props) => { const { version, post } = props const { theme = 'dark' } = useTheme() return ( <>

{post.frontmatter.title}

{date.format(new Date(post.frontmatter.publishedOn), 'DD/MM/YYYY')}

{ const { src, alt, ...props } = properties let source = src source = src?.replace('../public/', '/') return ( {alt} ) }, a: (props) => { if (props.href?.startsWith('#') ?? false) { return } return ( ) } }} />