import { 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 { Footer, FooterProps } 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 if (src?.startsWith('../public/') ?? false) { source = src?.replace('../public/', '/') } return {alt} }, a: (props: React.ComponentPropsWithoutRef<'a'>) => { if (props.href?.startsWith('#') ?? false) { return } return ( ) } }} />