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

sort combined markdown & contentful posts by date #54

Merged
merged 1 commit into from Apr 26, 2019

Conversation

@thiskevinwang
Copy link
Owner

commented Apr 26, 2019

Description

There was an issue with chronologically newer Markdown posts being displayer after older Contentful posts. This was due to how the two groups were being combined (_.union).

I used _.sortBy() to sort the union by the date of each post, from newest to oldest.

  • add date field to graphql queries
  • use _.sortBy()
sort combined markdown & contentful posts by date
- add date field to graphql queries 
- use _.sortBy()
@codeclimate

This comment has been minimized.

Copy link

commented Apr 26, 2019

Code Climate has analyzed commit 32d970a and detected 0 issues on this pull request.

View more on Code Climate.

@thiskevinwang thiskevinwang merged commit e6997eb into master Apr 26, 2019

3 of 6 checks passed

Header rules - coffeecodeclimb No header rules processed
Details
Pages changed - coffeecodeclimb 159 new files uploaded
Details
Redirect rules - coffeecodeclimb No redirect rules processed
Details
Mixed content - coffeecodeclimb No mixed content detected
Details
codeclimate All good!
Details
netlify/coffeecodeclimb/deploy-preview Deploy preview ready!
Details

@thiskevinwang thiskevinwang deleted the sort-cobimined-posts-by-date branch Jun 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.