diff --git a/cdmm/Gemfile b/cdmm/Gemfile index 21f4172..2d100ee 100644 --- a/cdmm/Gemfile +++ b/cdmm/Gemfile @@ -33,6 +33,8 @@ gem "tzinfo-data", platforms: %i[ windows jruby ] # Reduces boot times through caching; required in config/boot.rb gem "bootsnap", require: false +gem "meta-tags" + # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] # gem "image_processing", "~> 1.2" diff --git a/cdmm/Gemfile.lock b/cdmm/Gemfile.lock index d632e7f..257cdc2 100644 --- a/cdmm/Gemfile.lock +++ b/cdmm/Gemfile.lock @@ -141,6 +141,8 @@ GEM net-smtp marcel (1.0.4) matrix (0.4.2) + meta-tags (2.22.1) + actionpack (>= 6.0.0, < 8.1) mini_mime (1.1.5) minitest (5.25.1) msgpack (1.7.3) @@ -341,6 +343,7 @@ DEPENDENCIES debug importmap-rails jbuilder + meta-tags puma (>= 5.0) rails (~> 7.2.1, >= 7.2.1.1) rails_live_reload diff --git a/cdmm/app/helpers/application_helper.rb b/cdmm/app/helpers/application_helper.rb index de6be79..d6bcdff 100644 --- a/cdmm/app/helpers/application_helper.rb +++ b/cdmm/app/helpers/application_helper.rb @@ -1,2 +1,26 @@ module ApplicationHelper + def default_meta_tags + { + site: 'CDMM', + title: 'Continuous Delivery Maturity Model', + reverse: true, + separator: '|', + description: 'Continuous Delivery Maturity Assessment Form', + keywords: 'action, horror, drama', + canonical: request.original_url, + noindex: !Rails.env.production?, + icon: [ + { href: image_url('box.svg'), type: 'image/svg+xml' }, + # { href: image_url('icon.jpg'), rel: 'apple-touch-icon', sizes: '180x180', type: 'image/jpg' }, + ], + og: { + site_name: 'CDMM', + title: 'Continuous Delivery Maturity Model', + description: 'The Continuous Delivery Maturity Assessment Form', + type: 'website', + url: request.original_url, + # image: image_url('login-page.png') + } + } + end end diff --git a/cdmm/app/views/layouts/application.html.erb b/cdmm/app/views/layouts/application.html.erb index 70199c1..bfead44 100644 --- a/cdmm/app/views/layouts/application.html.erb +++ b/cdmm/app/views/layouts/application.html.erb @@ -1,6 +1,7 @@
+ <%= display_meta_tags default_meta_tags %>