Home

Things left to do

2023-01-28T22:32:00.000+01:00

This post serves as a living document on things that I still have left to do:

Todos need to be grouped for bottom margin (need to refactor the transformer for this)
Add title and other metadata to post page
Code block highlighting
Pass on all tags in the post list and leave it up to the client to figure out what to do with them
Figure out how links between pages of the same database (and later across databases) could work. Ideally, they store the id of the post in the link and we can try to fetch it.
Post links with ids are kind of ugly

Update (Jan 29th, 8:54 pm)

Links between pages are possible, but only with absolute links (meaning in the notion page, the url of the hosted pages as to be used instead of the built-in notion page link mechanism). This is not great, but the id passed on there by notion was not an id I could use to fetch a page.
Also, building links based on an uuid that might or might not be accessible by the extension (based on wether it lives in the same database or not) was weird and I did not want to make an extra request for verifying. So, for now, this supports absolute hyperlinks and strips out everything else.

Update 2 (Feb 1st, 21:40pm)

To be able to have nicer links for the posts, a custom property has to be defined on the entry. This library should then have an option to search a page in a database by the value of a property.

So I think I’d need:

  • getPropertyByName(name: string)
  • getPostIdByPropertyValue(propertyName: string, propertyValue: string)

Everything else would then have to be done in the client I guess, including writing a wrapper that uses the correct DB_ID

I can just use filter object on the database query from what it looks like: https://developers.notion.com/reference/post-database-query

Update 3 (Feb 3rd, 10:43pm)

Simplified some things. It’s now possible to pass whatever filter the notion api accepts to the listPages() function and filter based on that. This page now used the url field to determine if a post should be displayed and also uses that for linking instead of the ugly uuid.