epic-react-exercises
epic-react-exercises copied to clipboard
Each article/page should have its own title
Create a pageProperties.json that contains the title and description of that page content/topic/section/pageId
Edit to read and return pageProperties
https://github.com/mithi/epic-notes/blob/d624a04bb0733088f067095c08679a07ac286828/utils/index.js#L54
Edit this component to destructure the return of pageContents
https://github.com/mithi/epic-notes/blob/d624a04bb0733088f067095c08679a07ac286828/pages/react/%5Bsection%5D/%5BpageId%5D.js#L18
that passes it to
https://github.com/mithi/epic-notes/blob/d624a04bb0733088f067095c08679a07ac286828/components/notebook/index.js#L158
add
<Head>
<meta property="og:url" content={currentURL} key="ogurl" />
<meta property="og:image" content={previewImage} key="ogimage" />
<meta property="og:site_name" content={siteName} key="ogsitename" />
<meta property="og:title" content={pageTitle} key="ogtitle" />
<meta property="og:description" content={description} key="ogdesc" />
</Head>
or something
References
https://www.netlify.com/blog/2020/05/08/improve-your-seo-and-social-sharing-cards-with-next.js/