[site/MDX&slug]: fixes after rebase

This commit is contained in:
olayway 2022-06-06 13:58:22 +02:00
parent 2230fa22ec
commit 748df6f46f
2 changed files with 4 additions and 8 deletions

View File

@ -5,6 +5,7 @@ import { YOUTUBE_REGEX } from "../lib/constants";
import siteConfig from "../config/siteConfig";
import MdxContent from './MdxContent'
import useHeadingsObserver from '../hooks/useHeadingsObserver'
// import dynamic from 'next/dynamic'
// import { Paragraph } from "./Paragraph";
// import { Anchor } from "./Anchor";
@ -15,11 +16,11 @@ import useHeadingsObserver from '../hooks/useHeadingsObserver'
// const Paragraph = dynamic(() => import("./Paragraph").then(mod => mod.Paragraph))
export default function MdxPage({ body, frontMatter, editUrl }) {
export default function MdxPage({ body, frontMatter }) {
const observer = useHeadingsObserver();
const {
title, description, date, authors, youtube, podcast, image, _raw
title, description, date, keywords, youtube, podcast, image, _raw
} = frontMatter
let youtubeThumnbnail;

View File

@ -10,13 +10,8 @@ export default function Page({ body, ...meta }) {
created: meta.created === "Invalid Date" ? null : meta.created
}
// enable editing content only for claims, concepts, and guide for now
const editUrl = ['claims', 'concepts', 'guide'].includes(meta._raw.sourceFileDir)
? siteConfig.repoRoot + siteConfig.repoEditPath + meta._raw.sourceFilePath
: null
return (
<MdxPage body={body} frontMatter={frontMatter} editUrl={editUrl} />
<MdxPage body={body} frontMatter={frontMatter} />
);
}