feat: Add meta descriptions to pages

Adds a meta description tag to the landing, crops, plantings, harvests, seeds, and comments pages.

Also creates a new index page for comments.
This commit is contained in:
google-labs-jules[bot]
2025-12-01 13:54:54 +00:00
parent 16956682a9
commit 2742dba7fa
7 changed files with 23 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
- content_for :title, "Comments"
- content_for :meta_description, "Browse and search for comments."
- content_for :breadcrumbs do
%li.breadcrumb-item.active= link_to "Comments", comments_path
%h1 Comments
= will_paginate @comments
- @comments.each do |comment|
= render 'single', comment: comment
= will_paginate @comments

View File

@@ -1,4 +1,5 @@
- content_for :title, t('.title')
- content_for :meta_description, "Browse and search for crops."
- content_for :buttonbar do
- if can? :wrangle, Crop

View File

@@ -1,5 +1,6 @@
- content_for(:title) do
= title('harvests', @owner, @crop, @planting)
- content_for :meta_description, "Browse and search for harvests."
- content_for :breadcrumbs do
- if @owner
%li.breadcrumb-item= link_to 'Harvests', harvests_path

View File

@@ -1,5 +1,7 @@
- content_for :title do
= ENV['GROWSTUFF_SITE_NAME']
- content_for :meta_description do
Growstuff is a community of food gardeners. Let's learn to grow food together.
- if member_signed_in?
.row

View File

@@ -27,6 +27,10 @@
%title
= content_for?(:title) ? yield(:title) + " - #{ENV['GROWSTUFF_SITE_NAME']} " : ENV['GROWSTUFF_SITE_NAME']
- if content_for?(:meta_description)
%meta{name: "description", content: yield(:meta_description)}
- else
%meta{name: "description", content: "Growstuff is a community of food gardeners. Let's learn to grow food together."}
= csrf_meta_tags
= stylesheet_link_tag "application", media: "all"

View File

@@ -1,4 +1,5 @@
- content_for :title, title('plantings', @owner, @crop, @planting)
- content_for :meta_description, "Browse and search for plantings."
- content_for :breadcrumbs do
- if @owner

View File

@@ -6,6 +6,7 @@
%li.breadcrumb-item.active= link_to 'Seeds', seeds_path
- content_for :title, title('seeds', @owner, @crop, @planting)
- content_for :meta_description, "Browse and search for seeds."
.row
.col-md-2