Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more canonical URLs #6136

Merged
merged 3 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/views/devise/registrations/new.html.haml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- content_for :canonical_url, new_user_registration_url

#page-auth
%section.form-section
.inner
Expand Down
2 changes: 2 additions & 0 deletions app/views/devise/sessions/new.html.haml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- content_for :canonical_url, new_user_session_url

#page-auth
%section.form-section
.inner
Expand Down
2 changes: 2 additions & 0 deletions app/views/journey/show.html.haml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- content_for :canonical_url, journey_url

#page-journey
= render "journey/hero", user_tracks: @user_tracks
= render ReactComponents::Journey::JourneyPage.new("overview", params)
1 change: 1 addition & 0 deletions app/views/profiles/badges.html.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
- content_for :meta_title, "#{sanitize(@user.handle)}'s badges to Exercism".html_safe
- content_for :meta_description, "Explore #{sanitize(@user.handle)}'s badges on Exercism, and see which ones you're missing yourself".html_safe
- content_for :canonical_url, badges_profile_url(@user)

#page-profile-badges
= render ViewComponents::Profile::Header.new(@user, @profile, :badges)
Expand Down
1 change: 1 addition & 0 deletions app/views/profiles/contributions.html.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
- content_for :meta_title, "#{sanitize(@user.handle)}'s contributions to Exercism".html_safe
- content_for :meta_description, "See how #{@user.handle} has contributed to Exercism"
- content_for :canonical_url, contributions_profile_url(@user, order: params[:order].presence, page: params[:page].to_i > 1 ? params[:page] : nil)

#page-profile-contributions
= render ViewComponents::Profile::Header.new(@user, @profile, :contributions)
Expand Down
1 change: 1 addition & 0 deletions app/views/profiles/show.html.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
- content_for :meta_title, "#{sanitize(@user.handle)}'s profile on Exercism".html_safe
- content_for :meta_description, "Explore what #{@user.handle} has done on Exercism - their solutions, contributions and testimonials."
- content_for :canonical_url, profile_url(@user)

- if params[:first_time]
= render ReactComponents::Profile::FirstTimeModal.new(@profile)
Expand Down
1 change: 1 addition & 0 deletions app/views/profiles/solutions.html.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
- content_for :meta_title, "#{sanitize(@user.handle)}'s solutions Exercism".html_safe
- content_for :meta_description, "Explore #{sanitize(@user.handle)}'s solutions on Exercism, and see everything they've learnt.".html_safe
- content_for :canonical_url, solutions_profile_url(@user, order: params[:order].presence, page: params[:page].to_i > 1 ? params[:page] : nil)

#page-profile-solutions
= render ViewComponents::Profile::Header.new(@user, @profile, :solutions)
Expand Down
1 change: 1 addition & 0 deletions app/views/profiles/testimonials.html.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
- content_for :meta_title, "#{sanitize(@user.handle)}'s testimonials on Exercism".html_safe
- content_for :meta_description, "Explore the testimonails that students have left for #{@user.handle} on Exercism, and learn how wonderful they are!"
- content_for :canonical_url, testimonials_profile_url(@user, page: params[:page].to_i > 1 ? params[:page] : nil)

#page-profile-testimonials
= render ViewComponents::Profile::Header.new(@user, @profile, :testimonials)
Expand Down
2 changes: 1 addition & 1 deletion app/views/tracks/community_solutions/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- content_for :meta_title, "Community solutions for #{@exercise.title} in #{@track.title} on Exercism"
- content_for :meta_description, "Explore other people's solutions to #{@exercise.title} in #{@track.title}, and learn how others have solved the exercise.".html_safe
- content_for :canonical_url, track_exercise_solutions_url(@track, @exercise)
- content_for :canonical_url, track_exercise_solutions_url(@track, @exercise, order: params[:order].presence, page: params[:page].to_i > 1 ? params[:page] : nil)

#page-community-solutions-index
= render ViewComponents::Track::ExerciseHeader.new(@exercise, @solution, @user_track, :community_solutions)
Expand Down
1 change: 1 addition & 0 deletions app/views/tracks/concepts/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
- content_for :meta_title, "#{@track.title} key concepts on Exercism"
- content_for :meta_description, "Learn and master #{@user_track.num_concepts} key concepts in #{@track.title} on Exercism."
- content_for :canonical_url, track_concepts_url(@track)

#page-concepts-index
= render ViewComponents::Track::Header.new(@track, :concepts)
Expand Down