Top Level Namespace

Defined Under Namespace

Modules: Hobix, Publish, YAML Classes: Akismet, Array, Replicate, ReplicateFS, ReplicateFtp

Instance Method Summary collapse

Instance Method Details

#dateObject

calendar.rb – Hobix calendar plugin

Displays a one-month calendar in the sidebar. The calendar links individual days to a daily, monthly or yearly index page. Daily and monthly index pages display the corresponding month in the sidebar; yearly pages do something arbitrary and likely to be wrong; other pages display the current month.

The plugin generates separate sidebar .html file for each month. It places these files in htdocs/calendar/.

USAGE:

1) In hobix.yaml (e.g. by running ‘hobix edit <blogname>’), in the

'required' block, AFTER the "lib/local" line, append as follows:

required:

- hobix/plugin/calendar

 The plugin overwrites some of the default definitions in
 lib/local.rb, so in most cases it will need to be loaded later.
 You can also specify any of the following arguments:

required:

- hobix/plugin/calendar:
    start-on-monday: true
    point-to-index: daily
    day-symbols: ["Mon" "Tue" "Wed" "Thu" "Fri" "Sat" "Sun"]

 Options for 'point-to-index' are 'daily', 'monthly' and
 'yearly'.

NOTES:

1) If you redefine ‘sidebar_list’ in hobix.yaml, you’ll need to

explicitly add a 'sidebar_calendar' item.

2) Every sidebar page is regenerated every time you do an

upgen. This is slow.

3) The sidebar on yearly index pages is December of that year,

regardless of whether that month contains any posts. That's a
little weird.


43
# File 'lib/hobix/plugin/calendar.rb', line 43

require 'date'