jupyter-book icon indicating copy to clipboard operation
jupyter-book copied to clipboard

Document how to activate social media previews

Open choldgraf opened this issue 5 years ago • 3 comments

You need to add the following configuration to activate social media previews of the book:

html:
  baseurl: https://your-url.org

We should document this!

choldgraf avatar Aug 03 '20 22:08 choldgraf

@choldgraf does this actually work for you? I've tried enabling it on my Jupyter book and still get no auto social media / link previews unfortunately.

atg-abhishek avatar Jan 16 '21 08:01 atg-abhishek

Hmmm - it's been a while since I had looked into this. Do you see html "meta" tags for open graph in the output HTML when you use this config?

choldgraf avatar Jan 17 '21 14:01 choldgraf

I tried this, and I don't see any HTML "meta" tags for open graph.

My version info is below:

Jupyter Book      : 0.13.0
External ToC      : 0.2.4
MyST-Parser       : 0.15.2
MyST-NB           : 0.13.2
Sphinx Book Theme : 0.3.2
Jupyter-Cache     : 0.4.3
NbClient          : 0.5.13

Relevant part of _config.yml:

sphinx:
  config:
    html_baseurl: 'https://jmshea.github.io/Foundations-of-Data-Science-with-Python/'
  extra_extensions:
    - sphinx_sitemap
html:
  google_analytics_id: G-51XGJJ29T3
  base_url: https://jmshea.github.io/Foundations-of-Data-Science-with-Python/

jmshea avatar Jul 22 '22 16:07 jmshea