Trek::Pages::SearchEngineOptimizable
SEO metadata with sensible fallbacks: explicit title/description/image when set, model defaults otherwise (including the parent page's image).
Methods
| Method | Returns |
|---|---|
seo_values | { title:, description:, image:, slug: } with fallbacks applied |
meta_tags | seo_values without the slug — ready for your <head> |
default_title / default_description / default_image | the fallback values |
Usage
slim
/ app/views/layouts/application.html.slim
- @page.meta_tags.each do |name, content|
meta name=name content=content