Hi,
I'd very much like to be able to list my blog posts on a daily basis (used for logging work) - rather than have the Calendar plugin return the first post only.
There was some effort to do this as detailed here.
Set arbitrary date to be used by calendar plugin
I had a quick go at doing something similar on Debian Stable (Ikiwiki 3.0) but alas my Ikiwiki fu is not strong enough.
I'm not sure how I go about swapping the link on the day number to a link to, I guess, a dynamically generated page of links?
$linkcach{"$year/$mtag/$mday"}{$p} = ${p}
and a suitable whilst loop looks to be all that's needed...
Any pointers appreciated.
A patch has been proposed in comment
This has been applied. --Joey
So I ported the original patch mentioned to the latest Debian version. Well at least the bits that matter to me. See below.
In doing so I realized that it does quite work how I imagined it would; instead of generating a dynamic page for a particular day with a list of links it actually fills in the calendar with the details of the posts (making for some ugly formatting).
I'm hoping the tag generation pages will give me a clue how to alter this into what I want.
To revert the changes made above it is necessary not only to switch the detail level back down but to also regenerate the side-bar index.html file
should do it.
I got to grip with things to make a patch to do this.
Here it is in case of use to anyone.
To be clear, this patch creates a
yyyy/mm/dd
file for each day, listing the posts for that day, so the calendar can link to it rather than a random single post.While a valid solution certainly, that's a lot of added pages! Especially a high overhead for such a minor UI point as this.
Surely something interesting could be done with javascript or some other form of UI to make clicking on a day in a calendar that has multiple posts present a list of them? That would have essentially no overhead, since the calendar plugin already has a list of the posts made on a given day.
Ikiwiki already does something similar to deal with the case where a page has a great many backlinks.. It makes a UI element that, if hovered over, pops up a display of all the rest. This is done quite simply in the
page.tmpl
using the popup and balloon CSS classes. Calendar could also use this.[[!tag patch]]
Hello, here is a patch that:
That's all. No new pages for each day, takes as little space as it took before, and only a few lines more in the source.
The only thing I am not totally happy with is the CSS. We have to say that the text is aligned on the left (otherwise, it is aligned on the right, as is each day of the calendar), but I do not know which place is the more sensible to put that line of CSS in.
Regards,
-- Louis