Back to articles

Hello from Notion

Contents
  1. 01How the pipeline works
  2. 02What gets mapped
  3. 03A code block

This post was written in Notion and landed on the site without touching git. It exists to exercise every feature the sync pipeline has to handle.

How the pipeline works

An hourly GitHub Action queries this database for rows with Published ticked, converts each page to Markdown, and commits the result to the repository.

What gets mapped

  • The Name becomes the post title
  • The Slug decides the URL: /blog/hello-from-notion/
  • Tags become filterable chips on the site

A code block

const posts = await notion.dataSources.query({
  data_source_id: process.env.NOTION_DATA_SOURCE_ID,
  filter: { property: 'Published', checkbox: { equals: true } },
});

Notion is the source of truth: untick Published and the post disappears from the site on the next sync.

More details in the first post about how this blog was built.

The MONOIDX unit
The MONOIDX unit

Comments