Quarto deletes the original `index.ipynb` file when rendering a different notebook (`index.render.ipynb`) with `output-file: index`, despite the original file being explicitly ignored in the project configuration.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- javascript, jupyter-notebook
- Domain
- build-system, cli
Research direction
Create the files described in _quarto.yml, including index.ipynb and index.render.ipynb, then run quarto render with ipynb: default enabled. Verify that index.render.ipynb produces index.html, index.pdf, and the output index.ipynb while the ignored original index.ipynb remains untouched.
Written by the indexing model from the issue text.
Description
Bug description
Quarto unexpectedly deletes the original index.ipynb file when rendering a different notebook (index.render.ipynb) with output-file: index, despite the original file being explicitly ignored in the project configuration.
_quarto.yml
project:
type: website
render:
- '*.ipynb'
- '!index.ipynb'
website:
title: "Test"
format:
html: default
pdf: default
# When the following line is uncommented, the "index.ipynb" file is deleted upon render
# ipynb: default
index.ipynb
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"title: \"Test - index.ipynb\"\n",
"---\n",
"\n",
"## Test - index.ipynb\n",
"\n",
"This is a Quarto website.\n",
"\n",
"To learn more about Quarto websites visit <https://quarto.org/docs/websites>."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
index.render.ipynb
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"title: \"Test - index.render.ipynb\"\n",
"output-file: index\n",
"---\n",
"\n",
"## Test - index.render.ipynb\n",
"\n",
"This is a Quarto website.\n",
"\n",
"To learn more about Quarto websites visit <https://quarto.org/docs/websites>."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Note: The bug appears to be triggered when the
ipynb: defaultformat is uncommented in_quarto.yml. When this line is commented out, the originalindex.ipynbis not deleted.
Steps to reproduce
-
Create a Quarto project with the following files:
index.ipynb: A standard Quarto notebookindex.render.ipynb: A notebook withoutput-file: indexin its YAML front matter_quarto.yml: A project configuration file with!index.ipynbin the render options
-
Ensure
_quarto.ymlcontains:project: type: website render: - '*.ipynb' - '!index.ipynb' website: title: "Test" format: html: default pdf: default ipynb: default -
Run
quarto renderto build the project.
Note: The bug appears to be triggered when the
ipynb: defaultformat is uncommented in_quarto.yml. When this line is commented out, the originalindex.ipynbis not deleted.
Expected behavior
index.render.ipynbshould be rendered asindex.html,index.pdfandindex.ipynbin the output directory.- The original
index.ipynbshould remain untouched, as it's specified to be ignored in_quarto.yml.
Actual behavior
index.render.ipynbis correctly rendered asindex.html,index.pdfandindex.ipynbin the output directory.- The original
index.ipynbis unexpectedly deleted, despite being specified as ignored in the project configuration.
Your environment
Distributor ID: Ubuntu
Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy
Quarto check output
Quarto 1.5.57
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.2.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.41.0: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.5.57
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (external install)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /home/anon-b/.TinyTeX/bin/aarch64-linux
Version: 2024
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.10.12
Path: /usr/bin/python3
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with python3 -m pip install jupyter
[✓] Checking R installation...........(None)
Unable to locate an installed version of R.
Install R from https://cloud.r-project.org/
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from quarto-dev/quarto-cli
-
binder bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
quarto-dev/quarto-cli#14907 · 3 comments ·
-
brand bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
quarto-dev/quarto-cli#14891 ·
-
brand bug html revealjs
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
quarto-dev/quarto-cli#14882 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
quarto-dev/quarto-cli#14875 ·
-
Percent scripts: accept raw-string (r""") and '''-delimited markdown cells, as jupytext writes them Openengines-jupyter enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
quarto-dev/quarto-cli#14850 · 2 comments ·
All issues in quarto-dev/quarto-cli
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
avniproject/avni-client#2135 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
babalae/bettergi-scripts-list#3674 ·
-
A-Release-Notes C-Editing D-Modest S-Ready-For-Implementation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
bevyengine/bevy-website#2595 ·
-
ecosystem wording
Difficulty 1/5 Under an hour Newbie friendliness 90/100
matrix-org/matrix.org#3649 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
vadimdemedes/ink#1029 ·