Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subpages Support #35

Open
asmodat opened this issue Dec 22, 2022 · 1 comment
Open

Subpages Support #35

asmodat opened this issue Dec 22, 2022 · 1 comment

Comments

@asmodat
Copy link

asmodat commented Dec 22, 2022

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

@kmlbgn
Copy link

kmlbgn commented Nov 27, 2023

Bump. Would be super useful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants