Skip to content

Commit 8efda02

Browse files
josh146Mandrenkov
andauthored
Fix issue where twitter cards not registering (#29)
* Fix issue where twitter cards not registering * fix * Apply suggestions from code review Co-authored-by: Mikhail Andrenkov <[email protected]> * Update xanadu_sphinx_theme/layout.html Co-authored-by: Mikhail Andrenkov <[email protected]> * Update _version.py * Update xanadu_sphinx_theme/layout.html Co-authored-by: Mikhail Andrenkov <[email protected]>
1 parent c304d58 commit 8efda02

File tree

4 files changed

+31
-1
lines changed

4 files changed

+31
-1
lines changed

.github/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## Release 0.3.4 (current release)
2+
3+
### Bug fixes
4+
5+
* Fixed an issue where the `meta` directive in ReST files was not properly registering
6+
an Open Graph Twitter card.
7+
[#29](https://github.com/XanaduAI/xanadu-sphinx-theme/pull/29)
8+
9+
### Contributors
10+
11+
This release contains contributions from (in alphabetical order):
12+
13+
[Josh Izaac](https://github.com/josh146).
14+
115
## Release 0.3.4
216

317
### Improvements

doc/tutorials/tutorial_demo.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
Example Sphinx-Gallery demo
33
===========================
44
5+
.. meta::
6+
:property="og:description": An example demo using the Xanadu Sphinx Theme generated using Sphinx Gallery.
7+
:property="og:image": https://pennylane.ai/qml/_static/wigner.png
8+
59
This tutorial is an example demo generated using Sphinx Gallery. Here are a few
610
references to see what they look like [#stokes2019]_ [#sweke2019]_.
711

xanadu_sphinx_theme/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
using the following format: <major>.<minor>.<patch>[-<pre-release>].
44
"""
55

6-
__version__ = "0.3.4"
6+
__version__ = "0.3.5"

xanadu_sphinx_theme/layout.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
{# Do this so that bootstrap is included before the main CSS file. #}
44
{%- block htmltitle %}
5+
6+
7+
<meta property="og:title" content="{{ title|striptags|e }} &#8212; PennyLane">
8+
<meta property="og:url" content="{{ pageurl }}">
9+
<meta property="og:type" content="website">
10+
<meta name="twitter:card" content="summary_large_image">
11+
12+
{% if metatags is defined %}
13+
{% set description = metatags.split('\n') %}
14+
{{ description[0] }}
15+
{% endif %}
16+
517
<!-- Google Fonts -->
618
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Serif">
719
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto&display=swap">

0 commit comments

Comments
 (0)