Skip to content

Add data-author to author elements and blog improvements

Warren Gifford requested to merge brett/author into main

Created by: bretthayes

This closes #5469 (closed) along with some refactoring, improvements, and removal/consolidations of dupe code. This simplifies and creates consistency across our post index templates. 😁

Changelog

  • added data-author to our blog author elements so we can track author content GA
  • replaced old Sourcegraph logo mark heroImages with our new one in assistance with #5358 (closed) in the ./content directory
  • Consolidated individual post list item components and removed dupe code in lieu of a new PostListItem component
  • Consolidated individual post templates and removed dupe code in lieu of a new PostLayout component
  • PodcastListItem now uses the PostListItem component and includes some additions for a heroImage when it's not present. Now it shows the video thumbnail if a videoID is present in the frontmatter
  • Added a redirect for press-release in lieu of the more simpler /press route. Our routes are now based on BlogTypes in our interfaces as a source of truth
  • Added a redirect for /home -> / since we have a collocated homepage directory. This may change and be more supported in the next version of Next.js which introduces collocated file structures with nested layouts.

Test

  1. Ensure prettier has standardized the proposed changes.
  2. Ensure /blog, /podcast, and /press indexes load along with posts from each route (ie: press/sourcegraph-launches-batch-changes, /blog/{some-other-slug})

Merge request reports

Loading