1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-24 07:30:12 +01:00

Added support for changing edit icon

This commit is contained in:
squidfunk 2022-09-01 16:54:05 +02:00
parent 91361538ed
commit 909591e0a8
3 changed files with 11 additions and 2 deletions

View File

@ -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}"

View File

@ -3,7 +3,8 @@
-#}
{% if page.edit_url %}
<a href="{{ page.edit_url }}" 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" %}
</a>
{% endif %}
{% if "tags" in config.plugins %}

View File

@ -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" %}
</a>
{% endif %}