Skip to main content
Home

Built and signed on GitHub Actions

Import Notion pages into your Eleventy project

This package works with Node.js, Deno, Bun
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
100%
Published
3 months ago (0.0.5)
class NotionPageBuilder

A class that interacts with the Notion SDK to be an easy-to-work-with front for retrieving page front matter and content.

Constructors

new
NotionPageBuilder(unnamed 0: BuilderOptions)

Methods

getPageContent(
pageId: string,
options?: Omit<BuildOptions, "schema">,
): Promise<string>

Retrieve the content of a Notion page, given a set of inline and block formatters. Not all blocks are supported by default, but you may supplement your own formatters to suit your exact needs.

listUpdatedPages(
databaseId: string,
since: number,
options?: BuildOptions,
): Promise<Record<string, FrontMatter>>

Retrieve the front matter of all pages from a database that were modified after a specified point in time. The time must be specified as a timestamp (i.e. the number of milleseconds since the epoch, like what is returned by Date.now()). The return value is a record mapping a page UUID to its front matter.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@vrugtehagel/eleventy-from-notion

Import symbol

import { NotionPageBuilder } from "@vrugtehagel/eleventy-from-notion";
or

Import directly with a jsr specifier

import { NotionPageBuilder } from "jsr:@vrugtehagel/eleventy-from-notion";

Add Package

pnpm i jsr:@vrugtehagel/eleventy-from-notion
or (using pnpm 10.8 or older)
pnpm dlx jsr add @vrugtehagel/eleventy-from-notion

Import symbol

import { NotionPageBuilder } from "@vrugtehagel/eleventy-from-notion";

Add Package

yarn add jsr:@vrugtehagel/eleventy-from-notion
or (using Yarn 4.8 or older)
yarn dlx jsr add @vrugtehagel/eleventy-from-notion

Import symbol

import { NotionPageBuilder } from "@vrugtehagel/eleventy-from-notion";

Add Package

vlt install jsr:@vrugtehagel/eleventy-from-notion

Import symbol

import { NotionPageBuilder } from "@vrugtehagel/eleventy-from-notion";

Add Package

npx jsr add @vrugtehagel/eleventy-from-notion

Import symbol

import { NotionPageBuilder } from "@vrugtehagel/eleventy-from-notion";

Add Package

bunx jsr add @vrugtehagel/eleventy-from-notion

Import symbol

import { NotionPageBuilder } from "@vrugtehagel/eleventy-from-notion";