diff --git a/nbs/15_install.ipynb b/nbs/15_install.ipynb index fbc53b0..95b8427 100644 --- a/nbs/15_install.ipynb +++ b/nbs/15_install.ipynb @@ -87,9 +87,12 @@ " with open(os.path.join(td, 'kernel.json'), 'w') as f:\n", " json.dump(kernel_json, f, sort_keys=True)\n", "\n", - " # Copy logo to tempdir to be installed with kernelspec\n", + " # Copy logo and quarto_startup_cell to tempdir to be installed with kernelspec\n", " logo_path = resources.files('nbstata').joinpath('logo-64x64.png')\n", " copyfile(logo_path, os.path.join(td, 'logo-64x64.png'))\n", + " \n", + " qsc_path = resources.files('nbstata').joinpath('quarto_setup_cell')\n", + " copyfile(qsc_path, os.path.join(td, 'quarto_setup_cell'))\n", "\n", " print('Installing Jupyter kernel spec')\n", " KernelSpecManager().install_kernel_spec(td, 'nbstata', user=user, prefix=prefix)" diff --git a/nbstata/install.py b/nbstata/install.py index 7e99a58..f7c0e49 100644 --- a/nbstata/install.py +++ b/nbstata/install.py @@ -32,9 +32,12 @@ def install_kernel_spec(user=True, prefix=None): with open(os.path.join(td, 'kernel.json'), 'w') as f: json.dump(kernel_json, f, sort_keys=True) - # Copy logo to tempdir to be installed with kernelspec + # Copy logo and quarto_startup_cell to tempdir to be installed with kernelspec logo_path = resources.files('nbstata').joinpath('logo-64x64.png') copyfile(logo_path, os.path.join(td, 'logo-64x64.png')) + + qsc_path = resources.files('nbstata').joinpath('quarto_setup_cell') + copyfile(qsc_path, os.path.join(td, 'quarto_setup_cell')) print('Installing Jupyter kernel spec') KernelSpecManager().install_kernel_spec(td, 'nbstata', user=user, prefix=prefix)