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

Sorting collection via task options example does not work #127

Open
serebrov opened this issue Oct 21, 2014 · 1 comment
Open

Sorting collection via task options example does not work #127

serebrov opened this issue Oct 21, 2014 · 1 comment

Comments

@serebrov
Copy link

Note: this issue is related to #126, but it is not the same. #126 about "withSort" helper usage and this one about task options usage.

The collection sorting example (http://assemble.io/docs/Collections.html) looks like this:

assemble: {
  options: {
    pages: [
      {data: {title: 'Post #1' }, content: '{{md "blog/post1.md"}}' },
      {data: {title: 'Post #2' }, content: '{{md "blog/post2.md"}}' },
    ],
    collections: [
      {
        title: 'pages',
        sortorder: 'desc' 
      }
    ]
  }
}

Similar example is for "tags" collection.
Such configuration (with title: 'pages') does not work and name: "pages" should be used instead:

assemble: {
  options: {
    pages: [
      {data: {title: 'Post #1' }, content: '{{md "blog/post1.md"}}' },
      {data: {title: 'Post #2' }, content: '{{md "blog/post2.md"}}' },
    ],
    collections: [
      {
        name: 'pages',
        sortorder: 'desc' 
      }
    ]
  }
}
@doowb
Copy link
Member

doowb commented Oct 21, 2014

There's a pending PR on the assemble repo that might fix this. I'll be taking a look at it today.

@pburtchaell pburtchaell changed the title Documentation: Sorting collection via task options example does not work Sorting collection via task options example does not work Feb 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants