Skip to content

Dynamic blog merchandising

Lauren Barker requested to merge 5640-streamline-adding-merchandising into master

Why is this change being made?

This change is being made to create a single source of truth for blog merchandising banners and sidebars. Currently, blog merch is defined individually on every blog post. When something becomes out of date, it has to be manually updated on every post it displays on. This hapend last year with commit CTAs of past events being displayed on older blog posts.

This MR moves all content for merch banners and sidebars into a single data file called blog_merch.yml. What blog merch is displayed on a blog posts is still defined in blog post front matter, but the amount of front matter required is reduced to one line for a banner or/and sidebar.

To include a blog merch banner, choose one of the options as defined in blog_merch.yml and include the following in the front matter:

merch_banner: merch_one ( or merch_two, merch_three, merch_four, etc... )

To include a blog merch sidebar, choose one of four options as defined in blog_merch.yml and include the following in the front matter:

merch_sidebar: merch_one ( or merch_two, merch_three, merch_four, etc... )

AND include the following inside the blog post content where the sidebar should display:

<%= partial "includes/blog/blog-merch-sidebar-dynamic" %>`

This MR also updates the handbook with new instructions on how to include blog merch.

Does this MR meet the acceptance criteria?

Conformity

Closes #5640 (closed)

Edited by Brandon Lyon

Merge request reports