Saturday, January 3, 2015

tags n stuff

One thing I enjoy on my personal website is the restrospect page, where I show entries for this month and day for each year going all the way back to the blog's start in late-2000. Another thing I like on the site is a best of page, away of collating times I was actually creative on the day, but I haven't updated that listing for many years. I decided to try to bridge the gap with a personal "tag" based system; since I hit the retrospect page most days, I might as well use that daily review to gather the more interesting content I've made.

So I made a customized version of the retrospect page that I'll use for tagging over the course of 2015. The code I made is terribly hacky (as befits most of the rest of the backend of the site) but two bits of jQuery came in handy: the Tag-It library, which made the tag w/ autocomplete widget very easy, and then I had a chance for me to review using jQuery promises via the when() function, since I needed two separate Ajax queries (one that returned all unique tags, used to populate the Tag-It's autocomplete, and another for any previous tags I had entered) but wanted both to complete before I went ahead and initialized the tag widgets.

Both of those page have concise documentation pages, and I didn't run into any "gotchas", so I'm not going to go into more details here.

No comments:

Post a Comment