diff --git a/docs/schema.json b/docs/schema.json
index f9eeec6d7..5aa399818 100644
--- a/docs/schema.json
+++ b/docs/schema.json
@@ -41,7 +41,7 @@
},
"edit_uri": {
"title": "Path from repository root to directory containing Markdown",
- "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/adding-a-git-repository/#edit-button",
+ "markdownDescription": "https://www.mkdocs.org/user-guide/configuration/#edit_uri",
"type": "string"
},
"copyright": {
diff --git a/material/partials/actions.html b/material/partials/actions.html
index 06385a765..1031f1517 100644
--- a/material/partials/actions.html
+++ b/material/partials/actions.html
@@ -9,7 +9,12 @@
{% endif %}
{% if "content.action.view" in features %}
-
+ {% if "/blob/" in page.edit_url %}
+ {% set part = "blob" %}
+ {% else %}
+ {% set part = "edit" %}
+ {% endif %}
+
{% set icon = config.theme.icon.view or "material/file-eye-outline" %}
{% include ".icons/" ~ icon ~ ".svg" %}
diff --git a/src/partials/actions.html b/src/partials/actions.html
index a88da7bb6..75fcb8eb5 100644
--- a/src/partials/actions.html
+++ b/src/partials/actions.html
@@ -37,8 +37,13 @@
{% if "content.action.view" in features %}
+ {% if "/blob/" in page.edit_url %}
+ {% set part = "blob" %}
+ {% else %}
+ {% set part = "edit" %}
+ {% endif %}