kimadactyl / lgbthistoryfestival

Website for an LGBT History Festival in 2015
http://lgbthistoryfestival.org
0 stars 0 forks source link

Create unique keys for events so they can be linked to #36

Closed kimadactyl closed 9 years ago

queenp commented 9 years ago

Just confirmed that VEVENT UID is (by design in the RFC5455 ical spec) a unique per-event key. Will work on writing something that pulls event data from the downloaded ical and generates an easy persistent-url friendly string and relates it to the event UID for event pages.

queenp commented 9 years ago

Very nearly done on this. In terms of consistency for permalinking I've done a somewhat inadequate hack job of linking event UIDs to a permalink, pending finding a ruby gem that does nicer "pretty-url"ification without loading up rails. I believe, perhaps mistakenly, things could be unreliable generating them at site build time (via Rails) rather than maintaining a relation between event ids and nicely formatted url strings that then stays permanent (and is only added to when new events come on the gcal).

queenp commented 9 years ago

correction. it's all done, missing bang on a gsub was screwing it up.

queenp commented 9 years ago

Ps, hope it's okay that the keys in the events yml hash are event uids. It'd be complicated to do the opposite, searching the possible namespace for an available friendlyuids for a given event uid before inserting a key value pair. Could be worked around if it's a problem. Or just a get_friendly(uid) helper.