I’m playing around with data-driven content, using getJSON to retrieve a list of bookmarks from Pinboard and a list of posts from Micro.blog.
I’d like to build a front-page that lists everything, including local blog posts, sorted by date. Pagination isn’t important, let’s say it lists the latest 20 items. I’m familiar with the union function, but I can’t get it to work with the results from getJSON.
Is my goal possible, and if so: any tips for how to pull it off?
Is there a way to make them… I don’t know, “compatible” with each other? My goal here is to combine $localPosts and $microPosts into one set to range through and sort by date. In the above case the dates are accessible by .Date and .date_published – how would I combine and sort this?
I’m following most of what’s happening here, however I’m unsure about what the pipe character (|) is doing on lines 7, 11, and 12? Is that basically saying “and also do this”?