mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-18 13:38:24 -04:00
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:
13
app/views/comments/index.html.haml
Normal file
13
app/views/comments/index.html.haml
Normal 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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user