/** * 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. */ import React from 'react'; import {useBaseUrlUtils} from '@docusaurus/useBaseUrl'; import {useBlogPost} from '@docusaurus/theme-common/internal'; export default function BlogPostItemContainer({children, className}) { const { frontMatter, assets, metadata: {description}, } = useBlogPost(); const {withBaseUrl} = useBaseUrlUtils(); const image = assets.image ?? frontMatter.image; const keywords = frontMatter.keywords ?? []; return (
{description && } {image && ( )} {keywords.length > 0 && ( )} {children}
); }