notion-page-to-html icon indicating copy to clipboard operation
notion-page-to-html copied to clipboard

Subpages Support

Open asmodat opened this issue 1 year ago • 1 comments

Works well however does not support sub-pages, here is a demo code:

const NotionPageToHtml = require('notion-page-to-html');
const fs = require('fs');

async function getPage() {
  const { title, icon, cover, html } = await NotionPageToHtml.convert("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
  console.log(title);

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

getPage();

Subpages would be much more useful, especially for generating static pages with github actions

asmodat avatar Dec 22 '22 05:12 asmodat

Bump. Would be super useful

kmlbgn avatar Nov 27 '23 02:11 kmlbgn