Add data-author to author elements and blog improvements
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
heroImage
s 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 thePostListItem
component and includes some additions for aheroImage
when it's not present. Now it shows the video thumbnail if avideoID
is present in the frontmatter - Added a redirect for
press-release
in lieu of the more simpler/press
route. Our routes are now based onBlogType
s 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
- Ensure prettier has standardized the proposed changes.
- Ensure
/blog
,/podcast
, and/press
indexes load along with posts from each route (ie:press/sourcegraph-launches-batch-changes
,/blog/{some-other-slug}
)