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

Regex to adapt #28

Closed alexguillon closed 2 years ago

alexguillon commented 2 years ago

Hi ! Thanks for this package ;) But my notion URL is not notion.so but notion.site , I think that you'll need to adapt to accept other domain name. Can I open a PR for that pls ? ;)

https://github.com/asnunes/notion-page-to-html/blob/f0de0d77895bcfd71fa6b258e3b25dff82eb43bc/src/infra/usecases/to-page-id/url-validator.ts#L16

samarthdave commented 2 years ago

Bumping this, my URL samarthdave.notion.site/... is throwing an Invalid Page URL error and I've temporarily changed the code to:

private _isNotionPargeUrl(): boolean {
  return true;
}

Not ideal. Also it isn't getting the cover image or a table correctly... Might be because I hardcoded true in but I'm not sure.