Closed aaronpk closed 10 years ago
You would still have to deal with concurrency issues on the mentions file. Why not deal with concurrency and leave them together?
Actually it wasn't the concurrency I was worried about, but yes you're right that I'll still have to deal with that.
The main problem I've been running into is when a new webmention is added on the server, and then I update the post content on my laptop. I have to merge the changes manually.
Ah, this is why I didn't go the static site generator route, especially cause I knew content would be added dynamically on the site and because it doesn't work too well on mobile phones.
This is now complete! All existing mentions have been migrated, and new mentions are being stored separately.
Separately, as in, indiearchive?
For a post with a filename on disk of ./content/notes/2014/01/19-1.md
there is a corresponding file that contains references to the URLs that have mentioned that note, at ./mentions/notes/2014/01/19/1/indieweb-micropub.yml
. The mention file looks like this:
mentions:
- source: http://waterpigs.co.uk/notes/4UAVp/
target: http://aaronparecki.com/notes/2014/01/19/1/indieweb-micropub
date_received: "2014-01-20 00:29:56"
type: reply
Then when I need to go actually render a comment, I get the post data from my IndieArchive data store from a file named: ./external/waterpigs.co.uk/notes/4UAVp
which is the raw HTML. The microformats parser parses the page and stores the parsed JSON at ./external/waterpigs.co.uk/notes/4UAVp.json
Thanks @aaronpk for that insight!
Currently mentions of my posts are stored within the post file itself. (Only the URL and date are stored there, the actual mention content is stored using IndieArchive).
However this is causing some problems, mainly conflicts when updating post content since someone mentioning a post will cause the file to be updated too.
Instead, I want to store mentions of the URLs somewhere else, such as in a mirror file for each post. For example, if my post has a filename of
content/notes/2013/11/01-1.md
, then all mentions could be stored in a filementions/notes/2013/11/01-1.yml
.