Notion Account Suspended

A few days ago, I found out that my Notion account was suspended because I did not pay the subscription fee on time, though I remember purchasing the subscription and then cancelling it after it did not do what I wanted it to do. Anyway, I forgot about it. Then a few days ago I found out that my Notion account was locked. I couldn't access all my notes, my worklogs of about 3 months, and other documents that I had created. I knew I would eventually find a way to get them back, either by paying the outstanding invoice or by finding some loopholes.

However, some time ago I had to access some previously created documents and was unable to do so. This motivated me to pick back up a project I had almost abandoned some time ago: converting my Obsidian markdown files into HTML and then using a static file server to share them publicly.

Previously I had tried a few things, but they were based around the idea of replicating Notion-like individual note sharing, whereby I could specify a single file to be converted to HTML and shared publicly. But that posed a problem, because Obsidian notes are not single files, especially when they contain images. Images are files located in a separate directory and linked by filename. In Obsidian you can specify where attachments are stored, and Obsidian itself will find all images and attachments in the folder regardless of where the source file is located, meaning the relative path problem is not there anymore.

This becomes a problem when using tools like pandoc to convert markdown to HTML, because the relative path is not a thing and it cannot locate the links. I also did not spend time finding ways to specify to pandoc where linked files might be located. I looked into some Obsidian plugins that would export the entire vault as a directory to be shared, handling image linking for you, but that was not my goal at the time. I also found tools (Obsidian plugins) that would find the images and embed them into the HTML as binary data, but I could not find a way at the time to use the plugin API to call the plugin from external scripts. In the end I came up with a hacky solution (I don't remember correctly now) where I could use some tools to export a particular note, upload it manually to the server, and then use a Go file server to serve it. This is good for cases where I want to share notes with someone without letting them see the other notes, because each note has a unique title so they cannot guess (hopefully), and it also had a private endpoint through which the admin can view all listed notes.

However, as of 2 days ago, that's not what I wanted. I wanted a public worklog which I would update on a daily basis, that included my daily logs along with an appendix directory for other documents I created like guides, etc. For this particular scenario, I first created a separate Obsidian vault, then created a script that could be triggered to rsync my notes to my server. On Linux I used fuzzel/dmenu to trigger the script, and on macOS I can use an Alfred workflow. On the server there is a systemd service using Quartz to watch a particular directory; if it detects any change, it will auto-run the Quartz build command and generate HTML from the markdown. Then I have a performance-tuned nginx with heavy caching configured, serving the files on port 9000, and another Dokploy nginx container that proxies that traffic and binds it to the log.yousuf.life domain with an SSL certificate.