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

Display IFrame #21

Open
ccxzhang opened this issue Sep 7, 2023 · 1 comment
Open

Display IFrame #21

ccxzhang opened this issue Sep 7, 2023 · 1 comment
Assignees
Milestone

Comments

@ccxzhang
Copy link
Member

ccxzhang commented Sep 7, 2023

Hi @g4brielvs, I've several interactive visualizations (in HTML) that other people produced. I only have the products and several paragraphs to display. So, I would like to know the best way to display pre-produced HTML files in jupyter book.

Initially, I was trying to use jupyter notebook and IPython to display. When calling IFrame, it works for the notebook locally. However, when building the jupyter book, it would show as below:

jypyterbook-iframe

Given that Jupyter Notebook and IPython do not work in the Jupyter Book environment, I then translated it to a markdown file and embedded the iframe into the markdown file, which can be found here and additional CSS files. It works for Jupyter book, as shown here. Is there a better way to achieve this?

Additionally
Below is our config file for Jupyter Book.

# Bibliography settings
bibtex_bibfiles:
  - references.bib

sphinx:
  config:
    bibtex_reference_style: author_year
    html_extra_path: ['images']

html:
  home_page_in_navbar: true
  use_edit_page_button: true
  use_repository_button: true
  use_issues_button: true
  baseurl: https://github.com/worldbank/pacific-observatory

execute:
  execute_notebooks: "off"
  allow_errors: true
  timeout: 60

latex:
  latex_engine: xelatex
  latex_documents:
    targetname: book.tex
  use_jupyterbook_latex: true
@g4brielvs
Copy link
Member

g4brielvs commented Sep 7, 2023

@ccxzhang Thanks so much for opening this issue! I have prioritized the task and I will get back to you shortly with additional information and examples.

@g4brielvs g4brielvs added this to the v0.2 milestone Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Todo
Development

No branches or pull requests

2 participants