/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * Modified by David Garcia for Finboot. * * Modfications: * - Show descriptions on Blog List Page. */ import clsx from 'clsx'; import React from 'react'; import type {Props} from '@theme/BlogPostItem/Content'; // @ts-ignore the api exists on the package but is not exposed import { useBlogPost } from '@docusaurus/theme-common/internal'; import { blogPostContainerID } from '@docusaurus/utils-common'; import MDXContent from '@theme/MDXContent'; export default function BlogPostItemContent({ children, className, }: Props): JSX.Element { const {isBlogPostPage, metadata} = useBlogPost(); let description, content; if(isBlogPostPage) { content = (
{children}
); } else { description = (

{metadata.frontMatter.description}

); } return ( <> {description} {content} ); }