icon

Notion Block Renderer with Next.js SSR and Static Generation

A demo showcasing a custom Notion block renderer built from scratch for Next.js. Every Notion block is rendered on the server and during static generation using proper semantic HTML tags, ensuring accurate structure, accessibility, and SEO friendly output.

https://res.cloudinary.com/drzcgtzx8/image/upload/v1769624442/notion-as-a-cms/demo/notion-block-renderer-nextjs_wufet8.png
Posted by@Sujal Vanjare
Published on @

Rich text

Text 📝

Bold, Italicize, Underline, Link, code , break, s p a c i ng,

Color Text

Default, Gray, Brown, Orange, Yellow, Green, Blue, Purple, Pink, Red.

Background Text

Default, Gray, Brown, Orange, Yellow, Green, Blue, Purple, Pink, Red.

Inline Equation

E=mc2E = mc²

F=maF = ma

F=G(m1m2)/r2F = G * (m₁ * m₂) / r²

Emojis

😄 🎉 ❤️ 🔥 🤔 🚀 ✨ 🐱 🧠 🌍 💻 😎 📚 🙌👍🏻 👍🏼 👍🏽 👍🏾 👍🏿

Basic Blocks

Paragraph

Paragraph

purple color Paragraph

purple background Paragraph

Heading Blocks

Heading 1

pink color Heading 1

pink Background Heading 1

Heading 2

Heading 3

Bulleted list

  • Boil fresh water
  • Add coffee grounds to your filter or French press
  • Pour hot water over the coffee
  • Let it brew (about 4 minutes for French press)

Numbered list

  1. 1.a.i.
    Boil fresh water
  2. 2.b.ii.
    Add coffee grounds to your filter or French press
  3. 3.c.iii.
    Pour hot water over the coffee
  4. 4.d.iv.
    Let it brew (about 4 minutes for French press)
  5. 5.e.v.
    Press or filter the coffee
  6. 6.f.vi.
    Pour into your favorite mug ☕
  7. 7.g.vii.
    Add milk or sugar if desired
  8. 8.h.viii.
    Enjoy your coffee break! 😌

To-do

  • To-do item (unchecked)

  • To-do item (checked)

  • color to do (checked)

  • background to do (checked)

  • green color

  • blue color

  • purple color

  • pink color

  • red color

  • default color

  • gray color

  • brown color

Toggle

  • Toggle

    hi share this template

  • Toggle block with no nested blocks ( Appears with a faded toggle icon )

  • Toggle Block with Background

    If a background is applied to the toggle block, all nested blocks will inherit that background, unless a specific background is set on a nested block or rich text.

  • Toggle Block with Color

    Similarly, if a color is applied to the toggle block, all nested content will inherit that color — unless a nested block or text span has its own color applied.

Callout

💡

Callout

icon

Gray text

🔥

Purple

⚠️

Pink

📌

Red

Callout without Icon

Callout with nested blocks including callout text

Callout

Heading 1

Heading 2

Heading 3

paragraph

Callout with only nested blocks

Heading 1

Heading 2

Heading 3

paragraph

🔨

Callout block in callout block

Quote

Quote of the day!

brown color

brown background

Quote with nested blocks

To be or not to be, that is the question.

— William Shakespeare

Quote with nested blocks

Heading 1 inside Quote

Some supporting paragraph text.

  • A bullet list item
  • Another one

Even a nested quote block!

Quote Text Color

Stay hungry, stay foolish.

(The left border color of the quote block inherits from the block’s text color.)

Table

Table with Heading Row

NameRole
AliceDeveloper
BobDesigner

Table with Heading Column

TaskStatus
Create a websiteIn Progress
Add featuresCompleted

Table with Both Headings

CategoryFeatureDetails
PerformanceFast Build TimesBuilt with Next.js, Turbopack, and Tailwind CSS for an optimized and beautiful UI.
DesignCustom TemplatesBeautiful and responsive

Table Without Heading Row or Heading Column

CellCellCellCell
CellCellCellCell
CellCellCellCell
CellCellCellCell

Large overflow Table

Column 1Column 2Column 3Column 4Column 5Column 6Column 7Column 8
Row 1, Cell 1Row 1, Cell 2Row 1, Cell 3Row 1, Cell 4Row 1, Cell 5Row 1, Cell 6Row 1, Cell 7Row 1, Cell 8

Table Blocks in Column

Column 1Column 2Column 3Column 4Column 5Column 6Column 7Column 8
Row 1, Cell 1Row 1, Cell 2Row 1, Cell 3Row 1, Cell 4Row 1, Cell 5Row 1, Cell 6Row 1, Cell 7Row 1, Cell 8
Column 1Column 2Column 3Column 4Column 5Column 6Column 7Column 8
Row 1, Cell 1Row 1, Cell 2Row 1, Cell 3Row 1, Cell 4Row 1, Cell 5Row 1, Cell 6Row 1, Cell 7Row 1, Cell 8

Divider



Media Blocks

Image

Uploaded File Images via Notion

caption
caption

Unsplash Notion image URL

Image

Video

Uploaded Videos

caption

External platform-hosted videos

caption

YouTube Videos

This video starts at 0:16
caption

Facebook Video


Audio

External already hosted files ( elsewhere (e.g., S3, Dropbox, CDN) )
Externally hosted files (e.g., S3, Dropbox, or any public CDN URLs)

Code

Code block with with notion rich text

JavaScript
export default function Page() {
  return <div>Page</div>;
}
 Bold, Italicize, Underline, Link, code ,     break,    s     p   a  c i ng,$F = G * (m₁ * m₂) / r²$Notion as a CMS

JavaScript code block

JavaScript
function debounce(func, delay) { let timer; return function (...args) { clearTimeout(timer); timer = setTimeout(() => func.apply(this, args), delay); }; }

// Example usage:
const fetchData = () => { console.log("Fetching data..."); };

const debouncedFetch = debounce(fetchData, 1000);

document.getElementById("search").addEventListener("input", debouncedFetch);
  

File

dummy.pdf

Externally hosted files (e.g., S3, Dropbox, or any public CDN URLs)

Web Bookmark

The AI workspace that works for you. | Notion

Build custom agents, search across all your apps, and automate busywork. The AI workspace where teams get more done, faster.

Logo
https://www.notion.com/
Thumbnail
Caption
Notion CMS Next.js Portfolio Blog Template

Portfolio/blog template where Notion is used as a headless CMS, enabling full control of pages, routes, SEO, Open Graphs, header/footer links, social links, favicon, and sitemap.

Logo
https://www.sujalvanjare.com/templates/notion-cms-nextjs/portfolio-blog
Thumbnail

Advanced Blocks

Table of contents

Block equation

Pythagorean Theorem

a2+b2=c2a^2 + b^2 = c^2

Quadratic Formula

x=b±b24ac2a🔨x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}🔨

Synced block

Synced 👇🏻from “First blog post”

📌

This is a demo blog post used to show how blog pages look in this portfolio template.

You can replace this content with your own blog.


Toggle heading 1

Share this project with people who love Notion.

Toggle heading 2

Hi

Toggle heading 3

Share this project with people who love Notion.


Columns

2 Columns

Column 1

Column 2

3 Columns with Custom Widths

Column 1

Column 2

Column 3

4 Columns

Column 1

Column 2

Column 3

Column 4

5 Columns

Column 1

Column 2

Column 3

Column 4

Column 5

🤯 Nested columns? Yes! You can even place a Columns block inside a column, just like Notion allows.

Column 1

Column 1

Column 2

Column 2

Code - Mermaid

Mermaid
flowchart LR
    id1>This is the text in the box]
Mermaid
%% A simple Mermaid diagram
graph TD;
    A[Hello, World!] --> B{Sum};
    B -->|5| C[5];
    B -->|10| D[10];
    C --> E[Result];
    D --> E;

Embed

X Post (Tweet)

Instagram

Instagram Posts

Instagram Reels

Figma

Pinterest

Pinterest Posts

Pinterest Video

Facebook

Facebook Post

Facebook Reels

Facebook Video

PDF

Loading PDF...
Also you can add caption

Spotify

Spotify Track Embed
Spotify Playlist Embed

CodePen

Caption

CodeSandbox

Gist from GitHub

Google Maps

Google maps embed links

Google Form Embed

Mention inline

Mention Page

🎨Designing a Personal Website That Actually Converts ( First blog )

www.sujalvanjare.com

logovercelNext.js by Vercel - The React Framework

logoNotionThe AI workspace that works for you. | Notion

Unsplash Image mention

images.unsplash.com

YouTube Video mention

logo@braindamageOST GOBLIN Full Album 孤單又燦爛的神-鬼怪

logomarcosmusicAndré Gagnon - Comme au premier jour This video starts at 0:16

Tweet embed mention

logoSujal VanjareSujal Vanjare on Twitter / X

Mention a Date

@ with end date

@ with only start date

@ with only start date with relative date type change

@ (GMT+5) with time

@ (GMT+9) with time zone

@ today mention

@

@ (GMT+5) remind me tomorrow

Mention a User

@Sujal Vanjare