Skip to content

Instantly share code, notes, and snippets.

View baadaa's full-sized avatar
🥚
bald

Bumhan Yu baadaa

🥚
bald
View GitHub Profile
@paulgrieselhuber
paulgrieselhuber / Schema.js
Last active March 22, 2023 04:20
Adding Schema Data to Next.js Sites
import Head from "next/head";
import { site, siteTitle } from "../../config";
function strip(html) {
var one = html.replace(/<\/?[^>]+(>|$)/gm, "");
var two = one.replace(/[\r\n]\s*[\r\n]/gm, "");
return two;
}
const Schema = ({ post }) => {