Skip to content

Commit

Permalink
mkdocs: header source code link open in new browser tab
Browse files Browse the repository at this point in the history
Add source.html partial override file to open GitHub repository link in header
with a new browser tab/window
  • Loading branch information
practicalli-johnny committed Aug 17, 2023
1 parent 533a908 commit ee77b9a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions overrides/partials/source.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<a href="{{ config.repo_url }}" title="{{ lang.t('source') }}" class="md-source" data-md-component="source" target="_blank">
<div class="md-source__icon md-icon">
{% set icon = config.theme.icon.repo or "fontawesome/brands/git-alt" %}
{% include ".icons/" ~ icon ~ ".svg" %}
</div>
<div class="md-source__repository">
{{ config.repo_name }}
</div>
</a>

0 comments on commit ee77b9a

Please sign in to comment.