I always thought that iOS Notes is the perfect app to take notes.
So, like any developer would, I decided to create a complex setup that allows me to create a website from my notes.
Here is the TL;DR:
An iOS Shortcut takes all my notes.
Notes are processed and converted to Base64.
Using the GitHub API, a new file is committed to my repo with the content of my note.
A GitHub Action builds the website using Eleventy.
The site is published on GitHub Pages.
It does not require any additional app, and the website is fully under your control. I used Eleventy, but you can send the notes to any other service (WordPress, for example, using the REST API) or as simple HTML.
This is the base of my setup.
An iOS Shortcut is configured to run daily; it takes the notes modified today and processes them.
I did not find a trigger that starts the Shortcut after a note is edited, but a daily task is good enough.
I decided to use Eleventy for this blog, so there are a few things to do before committing the new files.
Frontmatter of my posts (sorry for the quality, the image is embedded in the note).
I use a Text action to add data to the frontmatter, and then another action converts this text to Base64.
After converting the note content to Base64, I can send it to my repo using the GitHub API.
This requires creating a Personal Access Token, but it is not a difficult task.
A GitHub Action is configured to run on every commit, and it builds the Eleventy website.
In theory, you could commit the notes as HTML and ignore this part of my setup, but Eleventy allows you to create a more complex static site.
Right now my blog is ultra minimal, but I have plans to make it more interesting.
The Shortcuts app is quite interesting, and I find it powerful enough to do a lot of things.
For example, I'm creating a shortcut that uploads Health data (steps) to a repository for public access.
Link to the repo: here