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

Generic collections & dayjs for date parsing #17

Merged
merged 3 commits into from
Aug 4, 2020

Conversation

bensmithett
Copy link
Owner

While other meta.collection values are possible, the posts collection has a bit of special behaviour baked around it.

  • It's hardcoded as the collection that generates the JSON Feed
  • It's a special prop passed to every page
  • It's expected that you set a meta.date whenever you set collection: 'posts'

Change

  • All collections are passed to every page in a collections prop
  • Every collection is sorted based on the page's meta.date if it exists (parsed & compared with dayjs)
  • The JSON Feed is now generated from the collection defined in tropical.feedCollection in package.json (defaults to posts)

@bensmithett bensmithett merged commit ce937e7 into master Aug 4, 2020
@bensmithett bensmithett deleted the general-collections branch August 4, 2020 10:56
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

Successfully merging this pull request may close these issues.

1 participant