Skip to content

Commit

Permalink
Add canonical urls by default with meta tags
Browse files Browse the repository at this point in the history
  • Loading branch information
rossta committed Jan 23, 2025
1 parent 93ab320 commit a1a3ddb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def seo_meta_tags
set_meta_tags twitter: {
site: "@joyofrails"
}
set_meta_tags canonical: url_for(only_path: false, overwrite_params: nil) unless meta_tags[:canonical]
display_meta_tags \
site: Rails.configuration.x.application_name,
description: "Interactive tutorials on Ruby, Ruby on Rails, Stimulus, " \
Expand Down

0 comments on commit a1a3ddb

Please sign in to comment.