As I previously wrote in my blog, I use an npm (node.js) package to convert Notion pages to markdown (
.md
) which is readable by Jekyll (in summary, Notion pages to Jekyll posts) → the article is available in my blog: so, today, I decided to add this configurations to my website too but I faced several problems (differences between two themes, different frontmatter style and so on) so I had to fix them.
after 20 minutes, most of them solved except one: extracting Description property from Notion page, its a
rich_text
and I had to solved the problem.I decided to figured out the style of API:
console.log(x.properties.Description); console.log(x.properties.Description.rich_text); console.log(x.properties.Description.rich_text[0]); console.log(x.properties.Description.rich_text[0].plain_text);
different output ⇒ the last one was what I was looking for
Done 🙂