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

Collections support #124

Closed
XhmikosR opened this Issue Aug 14, 2016 · 35 comments

Comments

Projects
None yet
@XhmikosR
Contributor

XhmikosR commented Aug 14, 2016

Say, I have the following config

collections:
    posts:
        permalink: /blog/:year/:month/:day/:title/
        output: true
    updates:
        permalink: /:collection/:year/:month/:day/
        output: true

Is it possible to generate a separate feed for updates?

@benbalter

This comment has been minimized.

Contributor

benbalter commented Aug 15, 2016

@XhmikosR that's not currently possible with the plugin. What URL would you want the second feed to be exposed at? /updates-feed.xml? We could theoretically add a feed: true to each collection's RSS (defaulting to on for Posts), but I wonder how common this use case is? Can you explain a bit more about what you're trying to do?

@XhmikosR

This comment has been minimized.

Contributor

XhmikosR commented Aug 21, 2016

@benbalter: I recently switched AppVeyor website to Jekyll. I had to use octopress/paginate since Jekyll's pagination is obsolete and non functional.

We have a collection, https://www.appveyor.com/updates/. I'd like to have a feed for updates only.

@k-funk

This comment has been minimized.

k-funk commented Sep 6, 2016

I'd like to see this feature. I expose two collections whose feeds are worth subscribing to: changelog, and blog

@jekyllbot

This comment has been minimized.

Contributor

jekyllbot commented Nov 6, 2016

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@jekyllbot jekyllbot added the stale label Nov 6, 2016

@kdkavanagh

This comment has been minimized.

kdkavanagh commented Nov 7, 2016

Similar to #70, this would be extremely helpful to have

@jekyllbot jekyllbot removed the stale label Nov 7, 2016

@jekyllbot

This comment has been minimized.

Contributor

jekyllbot commented Jan 7, 2017

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@jekyllbot jekyllbot added the stale label Jan 7, 2017

@DirtyF

This comment has been minimized.

Member

DirtyF commented Jan 19, 2017

👋 FWIW I'm interested in this feature. Collections are a core part of Jekyll, one should be able to easily create feeds for each. For now I'll go with a dedicated layout, it's an acceptable workaround.

@jekyllbot jekyllbot removed the stale label Jan 19, 2017

@jekyllbot

This comment has been minimized.

Contributor

jekyllbot commented Mar 19, 2017

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@jekyllbot jekyllbot added the stale label Mar 19, 2017

@XhmikosR

This comment has been minimized.

Contributor

XhmikosR commented Mar 20, 2017

Still a valid request.

@jekyllbot jekyllbot removed the stale label Mar 20, 2017

@pathawks

This comment has been minimized.

Member

pathawks commented Mar 20, 2017

If this is a feature request…please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

@DirtyF

This comment has been minimized.

Member

DirtyF commented Mar 20, 2017

@pathawks so maybe you should rename jekyll-feed to jekyll-posts-feed, to state what it does not do. 😜

Unless I'm mistaken posts and collections are core features, the main jekyll plugin in charge of generating feeds could also consider both types as core features. I'm not sure collections are used by 80% of Jekyll users, I get that this is a good reminder to try to stay focus on the essential, but core feature are core features right?

Unless this should be considered as an upstream bug as posts should be collections and that it should be transparent for this plugin?

So IMHO this issue seems legit.

@pathawks

This comment has been minimized.

Member

pathawks commented Mar 20, 2017

Reading through our collections documentation, none of the example use cases seem to be a good fit for a feed.

What is the use case?

@parkr

This comment has been minimized.

Member

parkr commented Mar 20, 2017

@DirtyF

This comment has been minimized.

Member

DirtyF commented Mar 20, 2017

@pathawks my use case is to provide a feed for something like https://www.thenewdynamic.org/links/

@jekyllbot

This comment has been minimized.

Contributor

jekyllbot commented May 20, 2017

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@jekyllbot jekyllbot added the stale label May 20, 2017

@XhmikosR

This comment has been minimized.

Contributor

XhmikosR commented May 20, 2017

Still valid.

@jhabdas

This comment has been minimized.

Contributor

jhabdas commented Jul 7, 2017

Proposed design (first iteration):

  • Add option to generate output on a per-collection basis as suggested in the OP.
  • But use Jekyll default values to define the items output, e.g. defaults.values.feed where defaults.scope.type: 'collectionlabel' ...
  • Allowing the feed key to contain a boolean value feed: <true|false>.
  • Include the items exported in the top-level output, differentiating them from posts using the atom:source element. (spec)

Keeps design limited to single feed file (easier implementation), enables site author to use in combination with something outputting a feed per collection and gives granular control for disabling feed output for specific collection items using file-level front matter overrides.

Proposed design (second iteration):

Output one XML file per collection and nest XML files in their respective folders. Use the top-level XML file as a digest with links to actual collection feed content using out of line content in addition to providing information about post feed.

@jhabdas

This comment has been minimized.

Contributor

jhabdas commented Jul 8, 2017

Implementation of the above proposed design spiked on and here's what works to get the source to output while retaining backwards compatibility with existing post logic:

{% for collection in site.collections %}  
  {% assign documents = collection.docs | where_exp: "document", "document.draft != true" %}
  {% for document in documents %}
    {% unless collection.label == "posts" and document.feed == false %}
      {% if document.feed == true or collection.label == "posts" %}
        <entry{% if document.lang %}{{" "}}xml:lang="{{ document.lang }}"{% endif %}>
          {% if collection.label != "posts" %}
            <source>
              {% assign crumbs = document.url | split: "/" %}
              {% assign id = "" %}
              {% for crumb in crumbs offset: 1 %}
                {% unless forloop.last %}
                  {% assign id = id | append: crumb %}
                {% endunless %}
              {% endfor %}
              <id>{{ "/" | append: id | absolute_url | xml_escape }}</id>
              <category>{{ collection.label }}</category>
            </source>
          {% endif %}
        </entry>
      {% endif %}
    {% endunless %}
  {% endfor %}
{% endfor %}

This works because posts are a collection of documents in site.collections. Would need to restore the branch logic to limit posts to 10 and figure out if large collections should have the number of items limited or made user-configurable (if not outputting all collection items by default).


Example config for use with the above implementation:

defaults:
  -
    scope:
      path: ''
      type: 'posts'
    values:
      layout: page
      feed: false # can be omitted, if set false hides posts output
  -
    scope:
      path: ''
      type: 'projects'
    values:
      layout: project-page
      feed: true # if set and value is true output collection items to feed

Example output of entry for collection leveraging Atom standard source element:

<entry>
  <!-- this is a normal entry inside /feed.xml -->
  ...
</entry>
<entry>
  <!-- this is a collection entry inside /feed.xml -->
  <source>
    <id>http://example.com/projects</id>
    <category>projects</category>
  </source>
  ...
</entry>

Macxim added a commit to Macxim/macxim.github.io that referenced this issue Aug 4, 2017

Fix feed
Collections don't seem to be supported (yet?)
jekyll/jekyll-feed#124
@jekyllbot

This comment has been minimized.

Contributor

jekyllbot commented Sep 9, 2017

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@jekyllbot jekyllbot added stale and removed stale labels Sep 9, 2017

@janpio

This comment has been minimized.

janpio commented Sep 14, 2017

What is the use case?

I use a collection for articles that are still sorted by date in several views, but also categorized into folders or other categories in others. They are similar to each other in that they get the same layout and have similar frontmatter fields.

In general per the documentation things in a collection are "not a page or a post". This means that they can have properties of both - which could also mean a feed. feed: true for a collection would make this possible.

@jhabdas

This comment has been minimized.

Contributor

jhabdas commented Sep 16, 2017

@pathawks does the use case @janpio provided warrant an enhancement tag for this issue?

@taksuyu

This comment has been minimized.

taksuyu commented Oct 2, 2017

I'd also like to see this feature as I have a collection that organizes content by week rather than day. Of course each individual post still has a valid post date that I'd like to include the site's feed.

@jhabdas

This comment has been minimized.

Contributor

jhabdas commented Oct 3, 2017

A workaround/hack for those looking to get collection feeds is to create a Rake task or bash script to run the Hugo binary to import parts of the site and create separate web feeds based off those. Hugo importer will slurp up a Jekyll site in a few seconds, and then you could leverage it to register stand-alone feeds for various sections.

Note Hugo uses RSS web feeds by default whereas Jekyll is emitting Atom via this gem.

@samkap

This comment has been minimized.

samkap commented Nov 22, 2017

Would love to see separate feeds happen for collections!

What is the use case?

I write about different topics and while tags can be great for that, it would be great to have different feeds for different audiences. My use case is that I'd love to be able to write about design and dev things on one feed while keeping culinary posts in their own section and with its own feed.

@h-enk

This comment has been minimized.

h-enk commented Dec 14, 2017

+1 for separate collection feeds

What is the use case?

I have a resources collection. Subscribers to the resources collection feed can stay updated on new releases of a resource.

Note, that e.g. WordPress supports feeds for custom post types and custom taxonomies - which you can mix and mingle. Like so: https://yourwebsite.com/feed/?post_type=resource&resource_category=free

@jekyllbot

This comment has been minimized.

Contributor

jekyllbot commented Feb 14, 2018

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@jekyllbot jekyllbot added the stale label Feb 14, 2018

@janpio

This comment has been minimized.

janpio commented Feb 14, 2018

Sorry @jekyllbot, but this is actually still a real missing feature that would be greatly appreciated. Definitely not stale.

@jekyllbot jekyllbot removed the stale label Feb 14, 2018

@pathawks

This comment has been minimized.

Member

pathawks commented Feb 14, 2018

I worry that this issue should be closed, instead of keeping it open to provide false hope.

This feature is not being worked on. There are currently (as far as I know) no plans to work on it.

I would be happy to review a PR, but developer time is finite and issues must be prioritized.

@XhmikosR

This comment has been minimized.

Contributor

XhmikosR commented Feb 14, 2018

A request is still a valid request regardless of anyone working on it.

@janpio

This comment has been minimized.

janpio commented Feb 14, 2018

But the developers can also close issues if they want to ;)

@pathawks I will take a shot at this if you in general are open to adding this functionality and see its use. (Just don't want to spend time creating a PR if there is no chance of it being accepted anyway.) Confirm?

@XhmikosR

This comment has been minimized.

Contributor

XhmikosR commented Feb 14, 2018

Of course they can, they can do anything they want to. :)

I'm just pointing out that this is a valid request and should be open since clearly many people want it, regardless of anyone working on it.

@pathawks

This comment has been minimized.

Member

pathawks commented Feb 14, 2018

@janpio Please do submit a PR. I would happily review it 👍🏼

@jekyllbot

This comment has been minimized.

Contributor

jekyllbot commented Apr 19, 2018

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@jekyllbot jekyllbot added the stale label Apr 19, 2018

@XhmikosR

This comment has been minimized.

Contributor

XhmikosR commented Apr 19, 2018

Still a valid request.

@jekyllbot jekyllbot removed the stale label Apr 19, 2018

@pathawks

This comment has been minimized.

Member

pathawks commented Apr 19, 2018

I’m going to close this for now.

This isn’t wont-fix, I would love to review a PR for this feature, but our resources are limited and keeping this issue open only adds noise and does nothing not do anything to advance this feature.

Again, I would happily review a PR if somebody else did the work for this feature, but we do not currently have the resources to implement it at this time.

@pathawks pathawks closed this Apr 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment