Skip to content

Commit 2042978

Browse files
committed
fix _quarto.yml msg
1 parent 6cbc03f commit 2042978

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

nbdev/quarto.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,8 @@ def refresh_quarto_yml():
152152
if 'title' not in vals: vals['title'] = vals['lib_name']
153153
ny.write_text(_nbdev_yml.format(**vals))
154154
qy = cfg.nbs_path/'_quarto.yml'
155-
if qy.exists() and not str2bool(cfg.get('custom_quarto_yml', False)):
156-
qy.unlink()
157-
print("NB: From v1.2 `_quarto.yml` is no longer auto-updated. Please remove the `custom_quarto_yml` line from `settings.ini`")
155+
if 'custom_quarto_yml' in cfg.d: print("NB: `_quarto.yml` is no longer auto-updated. Remove `custom_quarto_yml` from `settings.ini`")
156+
if qy.exists() and not str2bool(cfg.get('custom_quarto_yml', True)): qy.unlink()
158157
if not qy.exists(): qy.write_text(_quarto_yml)
159158

160159
# %% ../nbs/api/quarto.ipynb 16

nbs/api/quarto.ipynb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,8 @@
285285
" if 'title' not in vals: vals['title'] = vals['lib_name']\n",
286286
" ny.write_text(_nbdev_yml.format(**vals))\n",
287287
" qy = cfg.nbs_path/'_quarto.yml'\n",
288-
" if qy.exists() and not str2bool(cfg.get('custom_quarto_yml', False)):\n",
289-
" qy.unlink()\n",
290-
" print(\"NB: From v1.2 `_quarto.yml` is no longer auto-updated. Please remove the `custom_quarto_yml` line from `settings.ini`\")\n",
288+
" if 'custom_quarto_yml' in cfg.d: print(\"NB: `_quarto.yml` is no longer auto-updated. Remove `custom_quarto_yml` from `settings.ini`\")\n",
289+
" if qy.exists() and not str2bool(cfg.get('custom_quarto_yml', True)): qy.unlink()\n",
291290
" if not qy.exists(): qy.write_text(_quarto_yml)"
292291
]
293292
},

settings.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ allowed_metadata_keys =
6363
allowed_cell_metadata_keys =
6464
jupyter_hooks = True
6565
clean_ids = False
66-
custom_quarto_yml = True
6766
clear_all = False
6867
put_version_in_init = True
6968

0 commit comments

Comments
 (0)