DEV Community

Michellebuchiokonicha
Michellebuchiokonicha

Posted on • Edited on

How to Create a Preview Link in next.js with Open Graph.

There are a few documents that describe preview links in Next.js and this might pose a challenge for new users. However, this is as easy as it can get.

To create a preview link in next.js, go to your app.tsx or app.js and add the following to a

tag which you will include by importing Next/Head.

import Head from 'next/head'

If you however need to create preview links for different pages, this will be added to the different pages which a few more steps which I will share in my next article.

My Twitter Handle: https://twitter.com/mchelleOkonicha

My LinkedIn Handle: https://www.linkedin.com/in/buchi-michelle-okonicha-0a3b2b194/

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay