Skip to content

Each article/page should have its own title #75

Description

@mithi

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/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions