Skip to content

Instantly share code, notes, and snippets.

View crimson-knight's full-sized avatar

Seth T. crimson-knight

View GitHub Profile
@crimson-knight
crimson-knight / _bread-crumb-schema.html.erb
Last active March 2, 2020 12:14
Want a nice scalable way to produce breadcrumb schema mark up in a Rails app? Here you go! Just customize the base and pass it a hash, and you'll get compliant Schema for Google to use nice Bread Crumbs in your urls.
<%#
# Want to add fancy Bread Crumbs to your search results page?
# https://developers.google.com/search/docs/data-types/breadcrumb
# Here's a simple layout I made to make this easy to apply across all search engine findable content.
# Just use this in the bottom of your show page or index pages/views.
# To use this, just pass in an array of hashes, each hash with {name: , slug: }.