asnunes / notion-page-to-html

NodeJS tool to convert public Notion pages to HTML from page ID
MIT License
163 stars 45 forks source link

Some pages have incorrectly rendered images #37

Open icarofr opened 1 year ago

icarofr commented 1 year ago

Demo page and code:

import NotionPageToHtml from "notion-page-to-html";
import fs from "fs";

async function getPage() {
  const { html } = await NotionPageToHtml.convert(
    "https://jmlecoach.notion.site/Travis-Scott-x-Jordan-1-Low-OG-Olive-2ed7e492a0ed4588970efdf9a69ce954"
  );

  fs.writeFile("./out.html", html, function (err) {
    if (err) {
      return console.log(err);
    }
    console.log("The file was saved!");
  });
}

getPage();

The output ends up hiding some images and subtitles that are present in the original page.