Patch (calendar): autocreate archive pages when needed

master
Louis 2014-06-24 15:37:52 +02:00
parent cdc1c8204f
commit 492ea4f58a
2 changed files with 19 additions and 1 deletions

View File

@ -20,7 +20,7 @@ Having done this, the only purpose of ikiwiki-calendar would be to re-generate t
Did I miss something? If I am right, I offer to write the necessary patch, copied and adapted from the tag plugin, to generate the pages `archive_base/year/month.mdwn` on the fly.
-- Spalax
-- [[Louis|spalax]]
> Good spotting, `ikiwiki-calendar` predates the `add_autofile` API used to
> autocreate tag pages and was bolted in as an easy way to create calendar
@ -34,3 +34,5 @@ Did I miss something? If I am right, I offer to write the necessary patch, copie
> That last is, arguably, the real point of running ikiwiki-calendar in
> a cron job. Of course all it really does is run `ikiwiki -setup foo
> -refresh`. --[[Joey]]
> > [[Patch|todo/calendar_autocreate]]. -- [[Louis|spalax]]

View File

@ -0,0 +1,16 @@
Here is a patch that makes [[ikiwiki-calendar]] almost useless.
It adds some options, the main one being `calendar_autocreate`, which is
similar to the `tag_autocreate` option of the [[tag|plugins/tag]]: it create
archive pages when needed.
The documentation is updated as well (but as a non-native English speaker, I
won't be offended if you correct stuff you consider awkward):
- [[plugin|https://github.com/paternal/ikiwiki/blob/calendar-autocreate/doc/plugins/calendar.mdwn]]
- [[directive|https://github.com/paternal/ikiwiki/blob/calendar-autocreate/doc/ikiwiki/directive/calendar.mdwn]]
[[!tag patch]]
[[!template id=gitbranch branch=spalax/calendar-autocreate browse="https://github.com/paternal/ikiwiki/tree/calendar-autocreate" author="[[Louis|spalax]]"]]
--[[Louis|spalax]]