18f.gsa.gov
18f.gsa.gov copied to clipboard
Netlify posts collection sort by doesn't show latest posts
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
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.
Can this be broken up into two different tickets? One for creating a new data standard and one for updating older dates?
Sure, I no longer work at 18F, so do what you think is best.
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?
Closing for now as we are not actively using Netlify to maintain the 18F blog.