coleslaw-org/coleslaw

Feature wish: Postponed articles

dertuxmalwieder opened this issue · 8 comments

Hi,

in WordPress and some static blog systems there is a way to publish new articles after reaching their timestamp. This is handy if you - like me - have recurring articles like a new music article every Monday at 8:30 a.m.

However, Coleslaw seems to ignore timestamps; if I understand the code correctly, it blindly compiles everything that vaguely resembles a Markdown file immediately and links it on the front page without checking the timestamp first. I propose you to change this behavior.

Since it is static, this makes perfectly sense. It needs active interaction of the user to publish posts (which is updating the files on the server), so that feature would be very useless in coleslaw.

If you need such an behavior I can recommend you using a dynamic solution based on flat files.

Hi,
This seems to me as out of the scope of Coleslaw. Coleslaw is a static (blog-oriented) site generator. WordPress is a blogging platform. The difference being the WordPress runs as a long lived process in your server. Coleslaw takes your content in a git repository and transforms it to html. You have to use a web server to serve that static html.

There is a, hacky, way to have postponed articles (if you squint your eyes a little). Instead of executing coleslaw un a post- hook you can run it as a cronjob. This has its limitations. All the 'queued' articles would be published at once.

If you need such an behavior I can recommend you using a dynamic solution based on flat files.

Statocles can do it and Statocles is a static solution. I'm not convinced that it's impossible for Coleslaw ... :-)

All the 'queued' articles would be published at once.

The problem is that I would prefer to have them on time. :-/

The problem is that I would prefer to have them on time. :-/

Then you'd have to rewrite coleslaw to be a server daemon process.

Sounds easy. Why is there no daemon yet? :D

Because it is not the scope of coleslaw but feel free to fork it :)

The problem is that I would prefer to have them on time. :-/

The problem seems to me you are looking for a blog platform not a static site generator. To be clear, it is not that I don't see the value proposition of the feature but that the design and scope of Colesla causes, to put it mildly, at least some friction against this feature and the search function (and having comments among other things).

Looking at Statocles, I see its build command takes a date option. Similarly, we could have a plugin that extends the documents to have a publish-after slot. To be used by the discover method to add the document only if it is past that date. However one would have still have to run the coleslaw build script from a cronjob.

Sounds easy. Why is there no daemon yet? :D

As @lukasepple said a Coleslaw daemon running on the server is out of scope.

Similarly, we could have a plugin that extends the documents to have a publish-after slot. To be used by the discover method to add the document only if it is past that date.

That would work. Given that Coleslaw has an "even more static" approach, however, maybe this publish-after would be enough as long as the displayed "published date" is in the past.

For my personal needs, running Coleslaw's parser at 9 a.m., making it add my 8:30 a.m. entry as "published at 8:30 a.m.", would solve my problem. Admittedly, that would be a lie.