Skip to content

Commit

Permalink
[site/MDX&slug]: fixes after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
olayway committed Jun 6, 2022
1 parent 2230fa2 commit 748df6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
5 changes: 3 additions & 2 deletions site/components/MDX.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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;
Expand Down
7 changes: 1 addition & 6 deletions site/pages/[...slug].js
Original file line number Diff line number Diff line change
Expand Up @@ -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} />
);
}

Expand Down

0 comments on commit 748df6f

Please sign in to comment.