Commit Graph

3 Commits

Author SHA1 Message Date
Kartik K. Agaram 8cfc7e3e10 more conflict-resistant comment storage
Until now, comments were stored in filenames with an incrementing
counter. As a result, conflicts are easy; two people commenting on a
post around the same time would create the same filename. Then they'd
run into conflicts when merging.

Now comment filenames include a random slug.

A secondary consideration is filtering out comments from the file-picker
screen. It's only intended for top-level posts. I had a hacky way to do
this. My ideal approach would be a directory per post, but Lua+LÖVE
doesn't have a portable way to create directories.

Now you now have to manually create a single directory called
`comments/` in the directory of articles before using pothi.love.
2023-07-16 13:45:30 -07:00
Kartik K. Agaram 2697d5eb7f reply starting to work
I can't seem to break it, though I'm sleepy and don't have a good grasp
of the big picture.
2023-06-22 23:43:03 -07:00
Kartik K. Agaram 6a465257af reply button adds a reply
Still lots broken:
  - can't add more than one comment (not updating parent.replies)
  - not updating metadata on disk
2023-06-22 19:35:13 -07:00