Closed cranmer closed 3 years ago
related issue in jupyterbook https://github.com/executablebooks/jupyter-book/issues/1008
I will probably want to update the example page I sent with more text, which may hide the problem. So here's another page with the same issue that I will leave alone for testing: https://cranmer.github.io/stats-ds-book/test-sphinxext-opengraph.html
After building your repo, I have noticed this issue occurring on many of the pages. The issue seems to lie in raw tags. sphinxext-opengraph does not currently ignore raw tags. Once raw tags are excluded, the description is created correctly.
The latest release contains the fix for this issue, @cranmer .
It seems that if the text of a page is very short that the
og:description
may pick up HTML tags in the header that aren't properly escaped, and theog:description
text will be displayed on the web page.I am using jupyterbook, which uses sphinx. My jupyterbook has this in the
_config.yml
fileHere's an example source page https://github.com/cranmer/stats-ds-book/blob/master/book/statistics/cramer-rao-bound.md
This gets compiled into https://cranmer.github.io/stats-ds-book/statistics/cramer-rao-bound.html
The problematic part seems to be
As the webpage will display (not always visible, but you can see it on a phone or wide screen
It seems this was picked up from the HTML
Example: