Fix duplicate title if jekyll-seo-tag not in users's plugins (#1040)

In case 'just-the-docs' is used as a theme, and a user does not
eplicitly include 'jekyll-seo-tag' inside the plugins list in
_config.yml, two 'title' elements were rendered. Since
jekyll-seo-tag is always available, because it's set in the plugins
list of the theme itself, the 'seo' tag will aways work, making
the seperate title and description elements obsolete.

Fixes #1008
This commit is contained in:
Tom Brouwer 2022-11-15 09:09:59 +01:00 committed by GitHub
parent b09fd44d70
commit c498a5690a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,14 +2,6 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
{% unless site.plugins contains "jekyll-seo-tag" %}
<title>{{ page.title }} - {{ site.title }}</title>
{% if page.description %}
<meta name="Description" content="{{ page.description }}">
{% endif %}
{% endunless %}
{% include favicon.html %}
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-default.css' | relative_url }}">