From 54f23e3ae4a672ba2f08d0df34ac7e5a3bd2d9f6 Mon Sep 17 00:00:00 2001 From: Aoife Date: Thu, 18 Sep 2025 13:31:38 +0100 Subject: [PATCH 01/23] Add download button for Jupyter notebooks in tutorial pages --- .github/workflows/publish.yml | 2 +- .gitignore | 3 +- _includes/download-notebook.html | 56 ++++++++++++++++++++++++++++++++ _quarto.yml | 6 ++++ 4 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 _includes/download-notebook.html diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5cb81b4f0..c13c570e6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -83,7 +83,7 @@ jobs: sh assets/scripts/versions.sh - name: Render Quarto site - run: quarto render + run: quarto render --to html,ipynb - name: Rename original search index run: mv _site/search.json _site/search_original.json diff --git a/.gitignore b/.gitignore index 3c097ca05..c50c42e25 100644 --- a/.gitignore +++ b/.gitignore @@ -28,4 +28,5 @@ venv site_libs .DS_Store index_files -digest.txt \ No newline at end of file +digest.txt +**/*.quarto_ipynb diff --git a/_includes/download-notebook.html b/_includes/download-notebook.html new file mode 100644 index 000000000..db5ba4d55 --- /dev/null +++ b/_includes/download-notebook.html @@ -0,0 +1,56 @@ + + + \ No newline at end of file diff --git a/_quarto.yml b/_quarto.yml index 47c5159f3..8d2f93920 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -153,6 +153,11 @@ format: toc-title: "Table of Contents" code-fold: false code-overflow: scroll + code-tools: + source: true + toggle: false + caption: none + downloads: [ipynb] include-in-header: - text: | + - _includes/download-notebook.html include-after-body: - text: |