Skip to content

Commit ee77b9a

Browse files
mkdocs: header source code link open in new browser tab
Add source.html partial override file to open GitHub repository link in header with a new browser tab/window
1 parent 533a908 commit ee77b9a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

overrides/partials/source.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<a href="{{ config.repo_url }}" title="{{ lang.t('source') }}" class="md-source" data-md-component="source" target="_blank">
2+
<div class="md-source__icon md-icon">
3+
{% set icon = config.theme.icon.repo or "fontawesome/brands/git-alt" %}
4+
{% include ".icons/" ~ icon ~ ".svg" %}
5+
</div>
6+
<div class="md-source__repository">
7+
{{ config.repo_name }}
8+
</div>
9+
</a>

0 commit comments

Comments
 (0)