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

allow external link _target #1670

Closed
wants to merge 1 commit into from
Closed
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: 1 addition & 1 deletion _includes/masthead.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{% assign domain = site.url | append: site.baseurl %}
{% endif %}
<li class="masthead__menu-item">
<a href="{{ domain }}{{ link.url }}" {% if link.description %}title="{{ link.description }}"{% endif %}>{{ link.title }}</a>
<a href="{{ domain }}{{ link.url }}" {% if link.description %}title="{{ link.description }}"{% endif %} {% if link.target %}target="{{ link.target }}"{% endif %}>{{ link.title }}</a>
</li>
{% endfor %}
</ul>
Expand Down
5 changes: 3 additions & 2 deletions docs/_docs/07-navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ main:
url: /page-archive/
- title: "Collections"
url: /collection-archive/
- title: "External Link"
- title: "External Link"
url: https://google.com
target: "_blank"
```

Which will give you a responsive masthead similar to this:

![priority plus masthead animation]({{ "/assets/images/mm-priority-plus-masthead.gif" | relative_url }})

Optionally, you can add a `description` key per title in the `main` key. This `description` will show up like a tooltip, when the user hovers over the link on a desktop browser.
Optionally, you can add a `description` key per title in the `main` key. This `description` will show up like a tooltip, when the user hovers over the link on a desktop browser. You can also optionally specify a `target`, allowing you to open links in new tabs/windows.

**ProTip:** Put the most important links first so they're always visible and not hidden behind the **menu toggle**.
{: .notice--info}
Expand Down