Date Modified Tags Notion

I am a big fan of the mutli-use note taking tool Notion.so. In my opinion it is almost the perfect online documentation solution. So much better then something like Evernote. I also think their price point is spot on. One of those tools I have no problem paying for.

When I started hearing about others reverse engineering the internal Notion API to use Notion to power their blog I had to jump in and try it out also!

WARNING: This article is dynamic and currently in development! With that in mind the article may not be complete as you read it. As usual feel free to reach out to me in the comments below or contact me if you have any questions or need any clarification.

Why even do this?

Because it makes it easier for me to blog and share all the things I am working on. Anything that reduces the barrier to publishing content easily and quickly is a good thing in my opinion. I looked at the other day and I hadn't written a single tutorial in almost a year. Partially because I have been so busy but ALSO because my workflow wasn't as easy as it could be.

There are so many interesting technical scaling problems I have solved for Notifier for Reddit and for other projects I am doing that could really help others out but I didn't share them because it wasn't an easy enough workflow.

Now, with Notion helping out I can just easily write from any device and scripts do all the hard work of publishing for me.

I used a couple of libraries that really helped speed the development along.

I had to make some changes to notion-to-markdown because it looks like Notion changed their internal API call to export to markdown a bit. To do this I used chrome dev tools to monitor the API calls that the Notion web application was making. It was fun to do a bit of reverse engineering!

Overview of How it All Works

Overview:


             +-------------+
             |             |
             |  Notion.so  |
             |             |
             +-----+-------+
                   |
                   |
                   |
                   v
    +--------------+-------------------------+
    |  Python Script run by a Cron job       |
    |  That exports all pages in             |
    |  a space and exports them to Markdown  |
    |                                        |
    +--------------+-------------------------+
                   |
                   v
   +---------------+-------------------------+
   | Exported Markdown Files are             |
   | adjusted very slightly and then copied  |
   | over to the content/ folder of my       |
   | Pelican static blog codebase            |
   +--------------+--------------------------+
                  |
                  |
+-----------------v-----------------------------+
|Pelican static blog does what it does and      |
|a command is run to regenerate the whole blog. |
|HTML/CSS/JS files are stored in output folder. |
+-----------------------------------------------+

+----------------------------------------------+
|                 AWS S3                       |
|                                              |
|                                              |
|  In the final step, the output/ folder is    |
|  uploaded to S3 where it is hosted.          |
|                                              |
|                                              |
|                                              |
+----------------------------------------------+

Comments

comments powered by Disqus