18f.gsa.gov icon indicating copy to clipboard operation
18f.gsa.gov copied to clipboard

Netlify posts collection sort by doesn't show latest posts

Open Dahianna opened this issue 4 years ago • 1 comments

https://18f.gsa.gov/admin/#/collections/posts when sorting posts by newest-oldest the posts shown are not in the right order

To Do:

  • [ ] Parse all of the blog posts' frontmatter data to find discrepancies in page metadata
  • [ ] Fix and standardize blog bost metadata structure

Dahianna avatar Feb 17 '21 16:02 Dahianna

Getting up to speed

  • many entries missing date fields
  • date: YYYY-MM-DD is valid without quotes
  • so are dates with timestamps date: 'YYYY-MM-DDT12:00:00-04:00'
  • date: Month DD, YYYY is not valid - but this is how it is created in the editor currently. Changing the config to 'YYYY-MM-DD' instead works, but will not sort correctly for two entries on the same day.

We can solve going forward by changing the date config to something that netlify can sort on - it doesn't appear to change the way dates are displayed on the blog.

Going backward, we could update and insert date fields based on the file slugs with an automated script, or by hand if necessary.

peterrowland avatar Mar 25 '21 21:03 peterrowland

Can this be broken up into two different tickets? One for creating a new data standard and one for updating older dates?

Sgtpluck avatar Feb 16 '23 16:02 Sgtpluck

Sure, I no longer work at 18F, so do what you think is best.

Dahianna avatar Feb 16 '23 16:02 Dahianna

There are also questions here about whether we want to be using Netlify CMS. It's being picked up by another vendor and is supposedly going to be maintained again, but for now... maybe not?

mgwalker avatar Mar 03 '23 23:03 mgwalker

Closing for now as we are not actively using Netlify to maintain the 18F blog.

juliaklindpaintner avatar Feb 23 '24 18:02 juliaklindpaintner