Skip to content

Commit

Permalink
Fixed #90 Webapp - Used <link rel="alternate" hreflang="">
Browse files Browse the repository at this point in the history
  • Loading branch information
dzc34 committed Aug 5, 2017
1 parent 393ee97 commit b60a78c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
7 changes: 6 additions & 1 deletion webapp/src/main/webapp/WEB-INF/template/head.jspf
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,14 @@
<meta name="application-name" content="Contrast Finder">


<!-- Description / Canonical URL -->
<!-- Description / Canonical URL / alternate -->
<meta name="description" content="${metaDescription}">
<link rel="canonical" href="${canonicalURL}" />
<link rel="alternate" hreflang="x-default" href="${prefixURL}" />
<link rel="alternate" hreflang="en" href="${prefixURL}?lang=en" />
<link rel="alternate" hreflang="fr" href="${prefixURL}?lang=fr" />
<link rel="alternate" hreflang="pt" href="${prefixURL}?lang=pt" />
<link rel="alternate" hreflang="ko" href="${prefixURL}?lang=ko" />

<!-- Social network - Facebook -->
<meta property="author" content="Contrast-finder.org" />
Expand Down
17 changes: 9 additions & 8 deletions webapp/src/main/webapp/WEB-INF/template/template_variables.jspf
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@

<%-- Canonical URL --%>
<c:set var="prefixURL" value="https://app.contrast-finder.org/"/>
<c:choose>
<c:when test="${lang == 'en'}">
<c:set var="canonicalURL" value="${prefixURL}"/>
</c:when>
<c:otherwise>
<c:set var="canonicalURL" value="${prefixURL}?lang=${lang}"/>
</c:otherwise>
</c:choose>
<c:set var="canonicalURL" value="${prefixURL}?lang=${lang}"/>
<%-- <c:choose>
<c:when test="${lang == 'en'}">
<c:set var="canonicalURL" value="${prefixURL}"/>
</c:when>
<c:otherwise>
<c:set var="canonicalURL" value="${prefixURL}?lang=${lang}"/>
</c:otherwise>
</c:choose> --%>

<%-- TITLE tag --%>
<c:choose>
Expand Down

0 comments on commit b60a78c

Please sign in to comment.