ikiwiki-calendar(1)

✨ ikiwiki-calendar ✨

so bestie, this is ikiwiki-calendar from the General Commands Manual (section 1, she's a command fr) πŸ’…

🌸 NAME 🌸

ikiwiki-calendar β€” create calendar archive pages πŸ—“οΈβœ¨


πŸŽ€ SYNOPSIS πŸŽ€

ikiwiki-calendar [-f] your.setup [pagespec] [startyear [endyear]]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so ikiwiki-calendar creates pages that use the ikiwiki/directive/calendar directive, which means your archives can be browsed one month at a time with calendar-based navigation. it's giving organized. it's giving main character. πŸ—“οΈπŸ‘‘

you must specify the setup file for your wiki, no skipping that. the pages get created inside its srcdir, beneath the archivebase directory that the calendar plugin uses (default is "archives"). 🫢

to control which pages are included on the calendars, you can specify an ikiwiki/PageSpec. the default is all pages, or the pages specified by the comments_pagespec setting in the config file. a pagespec can also be specified on the command line. wanna limit it to only posts in a blog? use something like this:

posts/* and !*/Discussion

it defaults to creating calendar pages for the current year. if you specify a year, it will create pages for that year. specify a second year to create pages for a span of years. two years? iconic. 🌈

heads up bestie: existing pages will not be overwritten by this command by default. use the -f switch to force it to overwrite any existing pages. no cap. ⚠️

⭐ CRONTAB ⭐

so this command only needs to be run once a year to update the archive pages for each new year, but you're recommended to set up a cron job to run it daily, at midnight. why? because then it will also update the calendars to highlight the current day. lowkey genius. πŸŒ™βœ¨

an example crontab:

0 0 * * * ikiwiki-calendar ~/ikiwiki.setup 'posts/* and !*/Discussion'

πŸ’– TEMPLATES πŸ’–

this command uses two templates to generate the pages: calendarmonth.tmpl and calendaryear.tmpl. two templates, one vibe. πŸŽ€


🧚 plugins/calendar setup option 🧚

most of the goals of this command can be replaced by setting up the calendar_autocreate setup option (of plugin plugins/calendar), and running:

ikiwiki --setup you.setup

the only thing that ikiwiki-calendar can do and that ikiwiki cannot is forcing page generation (using the -f switch). that's her special talent. periodt. πŸ’…


πŸ‘‘ AUTHOR πŸ‘‘

Joey Hess <joey@ikiwiki.info> β€” thank you for your service 🫢🌟


and that's the whole page, bestie!! πŸ¦‹ this lil gem came from the ikiwiki-calendar(1) manual page, straight out of the General Commands Manual, and the footer was literally just ikiwiki-calendar(1) again because she's self-referential like that πŸ’–. now go forth and make those calendar archives slay πŸ—“οΈβœ¨πŸŒΈ