syegulalp / mercury

Pure Python CMS and blogging solution using static HTML
http://mercury.genjipress.com
Other
18 stars 2 forks source link

Changing the date of a post after it's gone live does not rebuild the archives for its previous date #90

Closed syegulalp closed 8 years ago

syegulalp commented 9 years ago

ALSO: The permalink for a page is not revised after the date is changed!

We need to push a rebuild operation for all the date-based archives for the previous date of a post.

Same goes for categories as well. Any DELETED categories will need to have their respective archives built, too. Rebuilding everything isn't practical, so we have to do it in a targeted way.

What we may want to do, then, is check for changes in all the things that matter, and push those changes concomitantly. This will require tallying all those changes -- maybe this is something we want to put into the archive type objects so that they can be acted on automatically if possible.

syegulalp commented 9 years ago

We'll need to hook this for date, category, tags, author, and provide some mechanism for hooking it for other archive types that are introduced in the future. Another good argument for having all the archive types and behaviors hooked centrally.

syegulalp commented 9 years ago

One way to do this:

Get a copy of the page before its modification - from the previous revision! - and use THAT as our publishing context to push things to the queue. Any duplicates will just get merged in the queue insert operation.

syegulalp commented 9 years ago

Note that the previous approach would break if revisions are turned off, but I'm thinking we want to have it so that there's never less than 1 revision anyway.

syegulalp commented 9 years ago

We don't need revisions to do this - just push to the queue from whatever the old neighbors are. If they're the same as what the new neighbors are, then they'll just get merged in the queue push operation anyway.

syegulalp commented 8 years ago

Finished closed this issue with 373686bf6a43846fa0dcd512047bc4cac9276f31