Closed paulmolluzzo closed 10 years ago
thanks for this - will take a look and incorporate over the next few days
On Tue, Apr 1, 2014 at 4:42 PM, Paul Molluzzo notifications@github.comwrote:
These are basic RSS feeds for Jobs and Experts. Both publish all of their respective collection whenever you go to ~/rss/jobs or ~/rss/experts. The lastBuildDate and pubDate are using the new Date() that was already in there. (And the comments from the code example are still in there too.) For the individual items I'm using the createdAt so that you can actually view a history.
This at least gets the ball rolling, and if it's worthwhile a link can be added to the navigation/footer of the site for quick access.
This PR is cleaner than the other one I made. Sorry for all the messiness.
You can merge this Pull Request by running
git pull https://github.com/paulmolluzzo/wework rss_feeds
Or view, comment on, or merge it at:
https://github.com/nate-strauser/wework/pull/7 Commit Summary
- Add rssfeed mrt package
- Add Jobs RSS feed
- Add Expert RSS feed
- Use createdAt for pubDate in RSS
File Changes
- M .meteor/packageshttps://github.com/nate-strauser/wework/pull/7/files#diff-0(1)
- M packages/.gitignorehttps://github.com/nate-strauser/wework/pull/7/files#diff-1(1)
- A rss.jshttps://github.com/nate-strauser/wework/pull/7/files#diff-2(72)
- M smart.jsonhttps://github.com/nate-strauser/wework/pull/7/files#diff-3(3)
- M smart.lockhttps://github.com/nate-strauser/wework/pull/7/files#diff-4(8)
Patch Links:
- https://github.com/nate-strauser/wework/pull/7.patch
- https://github.com/nate-strauser/wework/pull/7.diff
Reply to this email directly or view it on GitHubhttps://github.com/nate-strauser/wework/pull/7 .
No problem. I admit it is pretty rudimentary. I just pushed another commit that makes it a tad more robust.
The way this works now, it's "always the newest stuff" and you don't have to actively add items to the feed. It just pulls all the documents from the different collections when it publishes the feed.
However, the new commit makes the pubDate
the timestamp of the new job/expert and the lastBuildDate
the timestamp of the previous job/expert. If it works as I think it should, a RSS would see that the one new item is actually new. (From what I've read in the past couple of hours, they check for items newer than the last build date.)
I don't know if this is a best practice or not, but it's certainly better than what was there before this last commit. :)
merged and deployed - i made a couple changes - moved rss.js into server and protected against undefined results of the .findOne()
queries used for the feed date
thanks again - btw, mentioned you in meteor-talk update post about the url change
Awesome! Glad it helped. Thanks for the mention and the link, that's neat!
These are basic RSS feeds for Jobs and Experts. Both publish all of their respective collection whenever you go to
~/rss/jobs
or~/rss/experts
. ThelastBuildDate
andpubDate
are using thenew Date()
that was already in there. (And the comments from the code example are still in there too.) For the individual items I'm using thecreatedAt
so that you can actually view a history.This at least gets the ball rolling, and if it's worthwhile a link can be added to the navigation/footer of the site for quick access.
This PR is cleaner than the other one I made. Sorry for all the messiness.