Skip to content

Commit f6fb70e

Browse files
committed
Cannonical URLs improved and extended
1 parent 881e65e commit f6fb70e

4 files changed

Lines changed: 10 additions & 1 deletion

File tree

app/helpers/application_helper.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
module ApplicationHelper
2+
def cannonical_url
3+
url_for(only_path: false, protocol: 'https', host: 'registry.seqco.de')
4+
end
5+
26
def list_preference
37
cookies[:list] || 'cards'
48
end

app/views/genomes/show.html.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
<% provide(:title, @genome.title) %>
2+
<% provide(:canonical_url, cannonical_url) %>
3+
14
<%=
25
download_buttons([
36
[genome_url(@genome, format: :json), 'file-code', 'JSON']

app/views/names/show.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<% provide(:title, @name.abbr_name_raw) %>
2-
<% provide(:canonical_url, url_for(only_path: false, protocol: 'https')) %>
2+
<% provide(:canonical_url, cannonical_url) %>
33
<% provide(:description, @name.page_description) %>
44

55
<%= render(partial: 'title') %>

app/views/strains/show.html.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<% provide(:title, @strain.title) %>
2+
<% provide(:canonical_url, cannonical_url) %>
3+
24
<%=
35
download_buttons([
46
[strain_url(@strain, format: :json), 'file-code', 'JSON']

0 commit comments

Comments
 (0)