Remove "site name" from every page title? #5265
Answered
by
squidfunk
fredrikaverpil
asked this question in
Q&A
-
All pages in my docs ends with The reason for why I would like to do that is because, when using Giscus I would like to use the page title to create a discussion. It looks really weird when |
Beta Was this translation helpful? Give feedback.
Answered by
squidfunk
Mar 26, 2023
Replies: 1 comment 1 reply
-
Sure, you can override the title using theme extension, specifically the Lines 74 to 82 in 6a4be6b Something like this: {% extends "base.html" %}
{% block htmltitle %}
{% if page.meta and page.meta.title %}
<title>{{ page.meta.title }}</title>
{% elif page.title and not page.is_homepage %}
<title>{{ page.title | striptags }}</title>
{% else %}
<title>{{ config.site_name }}</title>
{% endif %}
{% endblock %} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
fredrikaverpil
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sure, you can override the title using theme extension, specifically the
htmltitle
block:mkdocs-material/src/base.html
Lines 74 to 82 in 6a4be6b
Something like this: