[site/seo]: fix conflicts and merge latest changes
This commit is contained in:
commit
2924b5e858
|
|
@ -9,7 +9,7 @@ const components = {
|
|||
p: Paragraph
|
||||
}
|
||||
|
||||
export default function MdxPage({ children }) {
|
||||
export default function MdxPage({ children, editUrl }) {
|
||||
const { Component, frontmatter: {
|
||||
title, description, date, authors, youtube, podcast, image, _raw
|
||||
}} = children
|
||||
|
|
@ -120,7 +120,20 @@ export default function MdxPage({ children }) {
|
|||
</div>
|
||||
</header>
|
||||
<main>
|
||||
<div className="my-6">
|
||||
<Component components={components} />
|
||||
</div>
|
||||
{editUrl && (
|
||||
<div className='mt-12 mb-6'>
|
||||
<a className="flex no-underline font-semibold text-yellow-li" href={editUrl} target="_blank">
|
||||
Edit this page
|
||||
<span className="mx-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth="2">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" />
|
||||
</svg>
|
||||
</span>
|
||||
</a>
|
||||
</div>)}
|
||||
</main>
|
||||
</article>
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ import Logo from "../public/img/life-itself-logo.svg"
|
|||
const siteConfig = {
|
||||
title: "Making Sense of Crypto and Web3",
|
||||
url: "https://web3.lifeitself.us",
|
||||
repoRoot: "https://github.com/life-itself/web3",
|
||||
repoEditPath: "/edit/main/",
|
||||
tagline: "",
|
||||
description:
|
||||
"Introductions to key concepts and ideas in crypto and web3. Plus in-depth evaluation of its potential impact.",
|
||||
|
|
|
|||
|
|
@ -1890,15 +1890,6 @@
|
|||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/load-script/-/load-script-1.0.0.tgz",
|
||||
"integrity": "sha1-BJGTngvuVkPuSUp+PaPSuscMbKQ="
|
||||
<<<<<<< Updated upstream
|
||||
},
|
||||
"loader-runner": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.2.0.tgz",
|
||||
"integrity": "sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==",
|
||||
"peer": true
|
||||
=======
|
||||
>>>>>>> Stashed changes
|
||||
},
|
||||
"lodash.camelcase": {
|
||||
"version": "4.3.0",
|
||||
|
|
@ -2315,15 +2306,6 @@
|
|||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.2.1.tgz",
|
||||
"integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q=="
|
||||
<<<<<<< Updated upstream
|
||||
},
|
||||
"merge-stream": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
|
||||
"integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
|
||||
"peer": true
|
||||
=======
|
||||
>>>>>>> Stashed changes
|
||||
},
|
||||
"merge2": {
|
||||
"version": "1.4.1",
|
||||
|
|
@ -3075,16 +3057,6 @@
|
|||
"react-is": "^16.13.1"
|
||||
}
|
||||
},
|
||||
"prop-types": {
|
||||
"version": "15.8.1",
|
||||
"resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
|
||||
"integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==",
|
||||
"requires": {
|
||||
"loose-envify": "^1.4.0",
|
||||
"object-assign": "^4.1.1",
|
||||
"react-is": "^16.13.1"
|
||||
}
|
||||
},
|
||||
"property-information": {
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/property-information/-/property-information-6.1.1.tgz",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import MdxPage from '../components/MDX';
|
||||
import { allOtherPages } from 'contentlayer/generated';
|
||||
import { useMDXComponent } from 'next-contentlayer/hooks';
|
||||
import siteConfig from "../config/siteConfig"
|
||||
|
||||
|
||||
export default function Page({ body, ...rest }) {
|
||||
|
|
@ -13,9 +14,14 @@ export default function Page({ body, ...rest }) {
|
|||
created: rest.created === "Invalid Date" ? null : rest.created
|
||||
},
|
||||
};
|
||||
|
||||
// enable editing content only for claims, concepts, and guide for now
|
||||
const editUrl = ['claims', 'concepts', 'guide'].includes(rest._raw.sourceFileDir)
|
||||
? siteConfig.repoRoot + siteConfig.repoEditPath + rest._raw.sourceFilePath
|
||||
: null
|
||||
|
||||
return (
|
||||
<MdxPage children={children} />
|
||||
<MdxPage children={children} editUrl={editUrl} />
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue