diff --git a/docs/schema/theme.json b/docs/schema/theme.json index f8762aab5..6ca89d158 100644 --- a/docs/schema/theme.json +++ b/docs/schema/theme.json @@ -436,6 +436,9 @@ "markdownDescription": "https://squidfunk.github.io/mkdocs-material/setup/changing-the-logo-and-icons/", "type": "object", "properties": { + "edit": { + "$ref": "#/definitions/icon" + }, "logo": { "$ref": "#/definitions/icon" }, @@ -550,6 +553,10 @@ }, "additionalProperties": false, "defaultSnippets": [ + { + "label": "edit", + "body": "edit: ${1:material/pencil}" + }, { "label": "logo", "body": "logo: ${1:material/library}" diff --git a/material/partials/content.html b/material/partials/content.html index 39d353ad8..11b7581b4 100644 --- a/material/partials/content.html +++ b/material/partials/content.html @@ -3,7 +3,8 @@ -#} {% if page.edit_url %} - {% include ".icons/material/pencil.svg" %} + {% set icon = config.theme.icon.edit or "material/pencil" %} + {% include ".icons/" ~ icon ~ ".svg" %} {% endif %} {% if "tags" in config.plugins %} diff --git a/src/partials/content.html b/src/partials/content.html index 514987a75..58f798b02 100644 --- a/src/partials/content.html +++ b/src/partials/content.html @@ -27,7 +27,8 @@ title="{{ lang.t('edit.link.title') }}" class="md-content__button md-icon" > - {% include ".icons/material/pencil.svg" %} + {% set icon = config.theme.icon.edit or "material/pencil" %} + {% include ".icons/" ~ icon ~ ".svg" %} {% endif %}