Skip to content

Trek::Pages::SearchEngineOptimizable

SEO metadata with sensible fallbacks: explicit title/description/image when set, model defaults otherwise (including the parent page's image).

Methods

MethodReturns
seo_values{ title:, description:, image:, slug: } with fallbacks applied
meta_tagsseo_values without the slug — ready for your <head>
default_title / default_description / default_imagethe fallback values

Usage

slim
/ app/views/layouts/application.html.slim
- @page.meta_tags.each do |name, content|
  meta name=name content=content

Released under the MIT License.