Skip to content

Commit

Permalink
Added identification for English language pages in top menu
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamCarroll committed Dec 15, 2019
1 parent 4780328 commit 6436928
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ main_pages:
languages:
en:
name: "English"
english: "English"
es:
name: "Español"
english: "Inglés"

defaults:
- scope:
Expand Down
4 changes: 3 additions & 1 deletion _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
{% assign englishPage = site.pages | where:"lang", "en" | where:"ref", ref | first %}
{% if localPage %}
{% assign page = localPage %}
{% assign shortTitle = page.short_title %}
{% else %}
{% assign page = englishPage %}
{% assign shortTitle = page.short_title | append:" (" | append:site.languages[localLang].english | append:")" %}
{% endif %}
<a class="page-link" href="{{ page.url | prepend: site.baseurl }}">{{ page.short_title }}</a>
<a class="page-link" href="{{ page.url | prepend: site.baseurl }}">{{ shortTitle }}</a>
{% endfor %}
</div>
</nav>
Expand Down

0 comments on commit 6436928

Please sign in to comment.