File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 41
41
},
42
42
"edit_uri" : {
43
43
"title" : " Path from repository root to directory containing Markdown" ,
44
- "markdownDescription" : " https://squidfunk.github.io/mkdocs-material/setup/adding-a-git-repository/#edit-button " ,
44
+ "markdownDescription" : " https://www.mkdocs.org/user-guide/configuration/#edit_uri " ,
45
45
"type" : " string"
46
46
},
47
47
"copyright" : {
Original file line number Diff line number Diff line change 9
9
</ a >
10
10
{% endif %}
11
11
{% if "content.action.view" in features %}
12
- < a href ="{{ page.edit_url | replace('edit', 'raw') }} " title ="{{ lang.t('action.view') }} " class ="md-content__button md-icon ">
12
+ {% if "/blob/" in page.edit_url %}
13
+ {% set part = "blob" %}
14
+ {% else %}
15
+ {% set part = "edit" %}
16
+ {% endif %}
17
+ < a href ="{{ page.edit_url | replace(part, 'raw') }} " title ="{{ lang.t('action.view') }} " class ="md-content__button md-icon ">
13
18
{% set icon = config.theme.icon.view or "material/file-eye-outline" %}
14
19
{% include ".icons/" ~ icon ~ ".svg" %}
15
20
</ a >
Original file line number Diff line number Diff line change 37
37
38
38
<!-- View button -->
39
39
{% if "content.action.view" in features %}
40
+ {% if "/blob/" in page.edit_url %}
41
+ {% set part = "blob" %}
42
+ {% else %}
43
+ {% set part = "edit" %}
44
+ {% endif %}
40
45
< a
41
- href ="{{ page.edit_url | replace('edit' , 'raw') }} "
46
+ href ="{{ page.edit_url | replace(part , 'raw') }} "
42
47
title ="{{ lang.t('action.view') }} "
43
48
class ="md-content__button md-icon "
44
49
>
You can’t perform that action at this time.
0 commit comments