Add custom HTML meta tag #7431
-
I want to add the following HTML tag validation between the
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hello @shenweiyan,
{% extends "base.html" %}
{% block extrahead %}
<meta name="bd-site-verification" content="codeva-hAB8gPWXkn" />
{% endblock %} The mkdocs-material/src/templates/base.html Lines 172 to 174 in d5363ad |
Beta Was this translation helpful? Give feedback.
Hello @shenweiyan,
I'm sure this was asked several times in some way before, but search doesn't show anything exact like your question.
If the meta tag is constant, the content doesn't change on the whole website then simply use customization with blocks:
https://squidfunk.github.io/mkdocs-material/customization/#overriding-blocks
theme: custom_dir: overrides
in yourmkdocs.yml
overrides
directory next to themkdocs.yml
main.html
file inside that directory with the following override:The
base.html
provides theextrahead
block and you in…