From efff153b5408bb2b7aa068b0970af28675de1018 Mon Sep 17 00:00:00 2001 From: Arnau Casau <47946624+arnaucasau@users.noreply.github.com> Date: Mon, 30 Oct 2023 19:25:54 +0100 Subject: [PATCH] Default Jupyter notebooks thumbnails (#402) * Default Jupyter notebooks thumbnails * fix templates --- docs/conf.py | 4 ++++ docs/how_tos/1-how-to-create-codes.ipynb | 6 +++++- docs/how_tos/2-how-to-work-with-shape-objects.ipynb | 6 +++++- docs/tutorials/QEC_Framework_IEEE_2022.ipynb | 6 +++++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 6f95771e..530c8a37 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -65,5 +65,9 @@ # a separate job # nbsphinx_execute = os.getenv('QISKIT_DOCS_BUILD_TUTORIALS', 'never') nbsphinx_execute = "never" +nbsphinx_thumbnails = { + # Default image for thumbnails. + "**": "_static/images/logo.png", +} nbsphinx_widgets_path = "" exclude_patterns = ["_build", "**.ipynb_checkpoints"] diff --git a/docs/how_tos/1-how-to-create-codes.ipynb b/docs/how_tos/1-how-to-create-codes.ipynb index 472df8bc..028571de 100644 --- a/docs/how_tos/1-how-to-create-codes.ipynb +++ b/docs/how_tos/1-how-to-create-codes.ipynb @@ -449,7 +449,11 @@ { "cell_type": "code", "execution_count": 5, - "metadata": {}, + "metadata": { + "tags": [ + "nbsphinx-thumbnail" + ] + }, "outputs": [ { "data": { diff --git a/docs/how_tos/2-how-to-work-with-shape-objects.ipynb b/docs/how_tos/2-how-to-work-with-shape-objects.ipynb index 42d66a93..43e7c717 100644 --- a/docs/how_tos/2-how-to-work-with-shape-objects.ipynb +++ b/docs/how_tos/2-how-to-work-with-shape-objects.ipynb @@ -115,7 +115,11 @@ "cell_type": "code", "execution_count": 14, "id": "4cc2c85f", - "metadata": {}, + "metadata": { + "tags": [ + "nbsphinx-thumbnail" + ] + }, "outputs": [ { "data": { diff --git a/docs/tutorials/QEC_Framework_IEEE_2022.ipynb b/docs/tutorials/QEC_Framework_IEEE_2022.ipynb index 634bcbcf..b959b21c 100644 --- a/docs/tutorials/QEC_Framework_IEEE_2022.ipynb +++ b/docs/tutorials/QEC_Framework_IEEE_2022.ipynb @@ -3422,7 +3422,11 @@ "cell_type": "code", "execution_count": 6, "id": "f0a623d3-21ef-4abe-a39b-210c00b509e4", - "metadata": {}, + "metadata": { + "tags": [ + "nbsphinx-thumbnail" + ] + }, "outputs": [ { "data": {