Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HTML meta-tag output #197

Merged
merged 1 commit into from
Mar 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 23 additions & 9 deletions qiskit_sphinx_theme/layout.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
{# Sphinx template variable setup #}
{%- if not embedded and docstitle %}
{%- set titlesuffix = " — "|safe + docstitle|e %}
{%- else %}
{%- set titlesuffix = "" %}
{%- endif %}
{%- set lang_attr = 'en' if language == None else (language | replace('_', '-')) -%}

<!DOCTYPE html>
<html class="no-js" lang="{{ lang_attr }}" >
<head>
{# CSS #}
<!-- get styles in qiskit_sphinx_theme: -->
<link rel="stylesheet" href="static/css/theme.css">
<!-- Get any custom styles in sphinx build: -->
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
<meta charset="{{ encoding }}">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{ metatags }}
{%- block htmltitle %}
<title>{{ title|striptags|e }}{{ titlesuffix }}</title>
{%- endblock %}
{%- if favicon_url %}
<link rel="shortcut icon" href="{{ favicon_url }}" />
{%- endif %}

{#- CSS #}
{%- for css in css_files %}
{%- if css|attr("rel") %}
<link rel="{{ css.rel }}" href="{{ pathto(css.filename, 1) }}" type="text/css"{% if css.title is not none %} title="{{ css.title }}"{% endif %} />
Expand All @@ -14,8 +28,8 @@
{%- endif %}
{%- endfor %}
{%- for cssfile in extra_css_files %}
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
{%- endfor %}
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
{%- endfor -%}

<link rel="modulepreload" href="https://unpkg.com/@qiskit/web-components/experimental-bundled-ui-shell.js">
<script type="module" src="https://unpkg.com/@qiskit/web-components/experimental-bundled-ui-shell.js"></script>
Expand All @@ -27,7 +41,7 @@
</style>

<!-- SEGMENT ANALYTICS -->
{% if analytics_enabled %}
{%- if analytics_enabled %}
<script>
(function () {
window._analytics = {
Expand Down Expand Up @@ -85,7 +99,7 @@

}());
</script>
{% endif %}
{%- endif -%}

</head>
<body class="pytorch-body">
Expand Down