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

Allow collection folders within category folders #6030

Closed
malacandrian opened this Issue Apr 15, 2017 · 12 comments

Comments

Projects
None yet
8 participants
@malacandrian

malacandrian commented Apr 15, 2017

  • This is a feature request.

The problem:

My Jekyll site contains many kinds of collection. It also uses categories. Each category contains and groups items from multiple collections. As such, categories act as a top-level ontology.

Right now each collection can have exactly one folder, and that folder must be in the root folder. This means that all items of a collection must be grouped together, even if they don't bear much relation to each other. e.g.:

  • /
    • /_collection1
      • Item1(Cat1)
      • Item2(Cat2)
      • Item3(Cat1)
    • /_collection2
      • Item1(Cat2)
      • Item2(Cat3)

As the number of items and categories grows, this will quickly become unsustainable. There is no easy way to see either which category a given post is in (without opening it) or all every item for a given category.

To get around this, I could create subfolders within my collections for each category, then use frontmatter defaults to apply the categories (ala #3287), however this has problems of its own:

  1. I need to change the config.yml whenever I add a category (minor, but still one step more than it should be)
  2. My document structure on disk no longer matches its logical structure
  3. (The main problem) It is the opposite layout to what _posts requires.

This means my structure would actually end up as

  • /
    • /cat1
      • /_posts
    • /cat2
      • /_posts
    • /_collection1
      • /cat1
      • /cat2
    • /_collection2
      • /cat1
      • /cat2

Proposed Solution:

Bring collections behaviour inline with posts, i.e. make the directory structure look like this:

  • /
    • /cat1
      • /_posts
      • /_collection1
      • /_collection2
    • /cat2
      • /_posts
      • /_collection1
      • /_collection2
@DirtyF

This comment has been minimized.

Show comment
Hide comment
@DirtyF
Member

DirtyF commented Apr 15, 2017

@DirtyF DirtyF added the discussion label Apr 15, 2017

@jekyllbot jekyllbot added the stale label Jun 15, 2017

@annegentle

This comment has been minimized.

Show comment
Hide comment
@annegentle

annegentle Jun 20, 2017

Contributor

Ooh, I'm interested in this solution as well.

My use case is to publish documentation sites with a version category and then a "deliverable" category -- effectively giving URLs like example.com/version/4.1/user-guide/ for example, with example.com/version/4.1.1/user-guide/ as the "next release" of the user guide files. Working on it in this repo: https://github.com/justwriteclick/versions-jekyll/

Not sure if there's another way to do what I want, which is output a directory per release with git/GitHub managing the version of the markdown files.

Contributor

annegentle commented Jun 20, 2017

Ooh, I'm interested in this solution as well.

My use case is to publish documentation sites with a version category and then a "deliverable" category -- effectively giving URLs like example.com/version/4.1/user-guide/ for example, with example.com/version/4.1.1/user-guide/ as the "next release" of the user guide files. Working on it in this repo: https://github.com/justwriteclick/versions-jekyll/

Not sure if there's another way to do what I want, which is output a directory per release with git/GitHub managing the version of the markdown files.

@jueadams

This comment has been minimized.

Show comment
Hide comment
@jueadams

jueadams Sep 1, 2017

Dear Jekyll Team,

this issue exists since the collections feature was introduced. From the Jekyll doc pages it should possible to define individual folders each collection as:

 scope:
      path: path_to_my_collection
      type: my_collection
 values:
      layout: my_collection_layout

but it does not work - the path attribute is not working. That seems to me the issue in general.

Without a working path, the root of a site source will polluted by growing collctions defined. That makes collections unusable for real world usage.

It is understandable that a Open Source Team is limited in resources, but the core functionality (of the product you manage) should have a focus.

Please have a look at the collection configuration, respectively why the path configuration does not work.

BTW: Jekyll is a great product - no reason to make it that poor. I would recomment to check Patreon to bring more power into the project.

Best regards,
Juergen Adams

jueadams commented Sep 1, 2017

Dear Jekyll Team,

this issue exists since the collections feature was introduced. From the Jekyll doc pages it should possible to define individual folders each collection as:

 scope:
      path: path_to_my_collection
      type: my_collection
 values:
      layout: my_collection_layout

but it does not work - the path attribute is not working. That seems to me the issue in general.

Without a working path, the root of a site source will polluted by growing collctions defined. That makes collections unusable for real world usage.

It is understandable that a Open Source Team is limited in resources, but the core functionality (of the product you manage) should have a focus.

Please have a look at the collection configuration, respectively why the path configuration does not work.

BTW: Jekyll is a great product - no reason to make it that poor. I would recomment to check Patreon to bring more power into the project.

Best regards,
Juergen Adams

@jekyllbot jekyllbot removed the stale label Sep 1, 2017

@DirtyF

This comment has been minimized.

Show comment
Hide comment
@DirtyF

DirtyF Sep 1, 2017

Member

@jueadams you may be delighted to learn that #6331 is scheduled for the next release 😄

P.S: I also thought about being able to collect donations via https://opencollective.com/, it's something we haven't not yet discussed with @jekyll/core

Member

DirtyF commented Sep 1, 2017

@jueadams you may be delighted to learn that #6331 is scheduled for the next release 😄

P.S: I also thought about being able to collect donations via https://opencollective.com/, it's something we haven't not yet discussed with @jekyll/core

@annegentle

This comment has been minimized.

Show comment
Hide comment
@annegentle

annegentle Sep 1, 2017

Contributor

Squeeeeeee! Thanks @DirtyF 🎉

Contributor

annegentle commented Sep 1, 2017

Squeeeeeee! Thanks @DirtyF 🎉

@jekyllbot jekyllbot added the stale label Nov 1, 2017

@Crunch09

This comment has been minimized.

Show comment
Hide comment
@Crunch09

Crunch09 Nov 4, 2017

Member

@DirtyF Hey, can this be closed now that #6331 has been merged?

Member

Crunch09 commented Nov 4, 2017

@DirtyF Hey, can this be closed now that #6331 has been merged?

@jekyllbot jekyllbot removed the stale label Nov 4, 2017

@malacandrian

This comment has been minimized.

Show comment
Hide comment
@malacandrian

malacandrian Nov 4, 2017

As far as I understand #6331 it solves a different problem. That lets you change which directory all the collections are found in. I was requesting splitting a collection up across categories (as is the current behaviour for pages).

malacandrian commented Nov 4, 2017

As far as I understand #6331 it solves a different problem. That lets you change which directory all the collections are found in. I was requesting splitting a collection up across categories (as is the current behaviour for pages).

@jekyll jekyll deleted a comment from jekyllbot Nov 4, 2017

@jekyll jekyll deleted a comment from jekyllbot Nov 4, 2017

@jekyll jekyll deleted a comment from jekyllbot Nov 4, 2017

@jekyllbot

This comment has been minimized.

Show comment
Hide comment
@jekyllbot

jekyllbot Jan 4, 2018

Contributor

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 3.3-stable or 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 building it first as a plugin. Jekyll 3 introduced hooks which provide convenient access points throughout the Jekyll build pipeline whereby most needs can be fulfilled. If this is something that cannot be built as a plugin, then please provide more information about why in order to keep this issue open.

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

Contributor

jekyllbot commented Jan 4, 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 3.3-stable or 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 building it first as a plugin. Jekyll 3 introduced hooks which provide convenient access points throughout the Jekyll build pipeline whereby most needs can be fulfilled. If this is something that cannot be built as a plugin, then please provide more information about why in order to keep this issue open.

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 4, 2018

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Jan 5, 2018

Member

I’d be happy to see collections work the same as posts in this regard. This is taken care of in the Reader classes we have if you can get a PR going!

Member

parkr commented Jan 5, 2018

I’d be happy to see collections work the same as posts in this regard. This is taken care of in the Reader classes we have if you can get a PR going!

@jekyllbot jekyllbot removed the stale label Jan 5, 2018

@ashmaroli

This comment has been minimized.

Show comment
Hide comment
@ashmaroli

ashmaroli Jan 5, 2018

Member

This is taken care of in the Reader classes

we have a PostReader class and CollectionReader with differing definition.. can the former inherit from the latter in 3.x series? (I don't see why not..)

Member

ashmaroli commented Jan 5, 2018

This is taken care of in the Reader classes

we have a PostReader class and CollectionReader with differing definition.. can the former inherit from the latter in 3.x series? (I don't see why not..)

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Jan 5, 2018

Member

It would be really neat to just replace the PostReader with a CollectionReader!

Member

parkr commented Jan 5, 2018

It would be really neat to just replace the PostReader with a CollectionReader!

@DirtyF DirtyF added discussion and removed discussion 💭 labels Mar 2, 2018

@jekyllbot

This comment has been minimized.

Show comment
Hide comment
@jekyllbot

jekyllbot Apr 30, 2018

Contributor

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 3.3-stable or 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 building it first as a plugin. Jekyll 3 introduced hooks which provide convenient access points throughout the Jekyll build pipeline whereby most needs can be fulfilled. If this is something that cannot be built as a plugin, then please provide more information about why in order to keep this issue open.

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

Contributor

jekyllbot commented Apr 30, 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 3.3-stable or 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 building it first as a plugin. Jekyll 3 introduced hooks which provide convenient access points throughout the Jekyll build pipeline whereby most needs can be fulfilled. If this is something that cannot be built as a plugin, then please provide more information about why in order to keep this issue open.

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 30, 2018

@jekyllbot jekyllbot closed this Jun 30, 2018

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