Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rss feeds #1

Closed
gregmolnar opened this issue Jul 15, 2014 · 14 comments
Closed

Rss feeds #1

gregmolnar opened this issue Jul 15, 2014 · 14 comments

Comments

@gregmolnar
Copy link
Contributor

On the current website there are separate feeds for categories but I don't see the categories set in the new files.
There is also a typo in the new files: creatd_by

@h-lame
Copy link
Member

h-lame commented Jul 15, 2014

By category do you mean /rss/meetings vs. /rss/podcasts vs. /rss/book-reviews etc.? I figure we can deal with that (somehow) via the folder structure (e.g. /rss/meetings/ would just have all the content from /meetings, /rss/podcasts would have everything from /podcasts/ etc...)

I'll fix that creatd_by thing - it'll be easiest to fix the export script and re-output the content.

@gregmolnar
Copy link
Contributor Author

Yes, I meant that. If you would add this tag to the header:

category: meetings

It would make easier to generate the RSS than try to hack into middleman and parse the file structure.

@h-lame
Copy link
Member

h-lame commented Jul 15, 2014

The pages in radiant don't actually have categories as such, they just live under a folder with that name and it's easy to get all the child pages of a given url and iterate over them to generate the rss feed for that "category". I could probably extend the export script to add a category to each child page, based on the 1st level root, but that might be iffy.

Now that I've looked at middleman a bit more (only briefly, so I could very much be wrong!) it looks like we could do something similar to what radiant does by with the Middleman::Sitemap and querying for all pages that live under a given path.

@gregmolnar
Copy link
Contributor Author

By looking at this: http://rubydoc.info/gems/middleman-core/Middleman/Sitemap/Queryable I don't think we can do a query to achieve that.
On another note is there a specific reason to go with Middleman and not Jekyll?

@h-lame
Copy link
Member

h-lame commented Jul 15, 2014

No real reason other than I've never really got on board with jekyll whenever I've tried to use it before.

@gregmolnar
Copy link
Contributor Author

That's cool. I just thought maybe there is some nice extra functionality in Middleman which I don't know about.
Do you want me to give a try to generate the category tags from the radiant export?

@h-lame
Copy link
Member

h-lame commented Jul 15, 2014

It might be hard for you as you don't have the database of content from radiant for you to test it out on...

@gregmolnar
Copy link
Contributor Author

Would it be possible to share that somewhere? Or just a partial of the database dump?

@h-lame
Copy link
Member

h-lame commented Jul 15, 2014

It looks like we could do something like:

meetings_root = sitemap.where(:slug => 'meetings').first to get the /meetings/ page and then we can do meetings_root.children to iterate over the child pages. Happilly that seems to not include partials. It's not clear to me why something like sitemap.where(:url.include => "/meetings/") doesn't work. Well, I mean it is because I've looked at the source and you can only query stuff in frontmatter, but it's not clear why we have that restriction when I'd've thought querying by path or url would be very useful.

@h-lame
Copy link
Member

h-lame commented Jul 15, 2014

Yeah, I think we can do it this way. Have a look at https://github.com/lrug/lrug.org/blob/static-middleman/lib/lrug_helpers.rb#L14-L19 and https://github.com/lrug/lrug.org/blob/static-middleman/lib/lrug_helpers.rb#L21-L30 (commits e019357, ec5adbe, and 101c03e give some context on how they're used).

@gregmolnar
Copy link
Contributor Author

Awesome. I will give this a go than hopefully today.

@gregmolnar
Copy link
Contributor Author

Would it be possible to add the title to the frontmatter for the articles? I would need that to set the title in the RSS feeds. If not I can just humanize the url I guess.

@h-lame
Copy link
Member

h-lame commented Jul 16, 2014

I spotted that too, it should be as of: c082e62

@h-lame
Copy link
Member

h-lame commented Jul 29, 2014

I think we might have closed this with #2.

@h-lame h-lame closed this as completed Jul 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants