Skip to content

Commit f179214

Browse files
committed
add config file to --watch
1 parent 966668d commit f179214

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

quartodoc/__main__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ def build(config, filter, dry_run, watch, verbose):
9999
"""
100100
Generate API docs based on the given configuration file (`./_quarto.yml` by default).
101101
"""
102+
cfg_path = f"{os.getcwd()}/{config}"
103+
if not Path(cfg_path).exists():
104+
raise FileNotFoundError(
105+
f"Configuration file {cfg_path} not found. Please create one."
106+
)
102107
if verbose:
103108
_enable_logs()
104109

@@ -115,6 +120,7 @@ def build(config, filter, dry_run, watch, verbose):
115120
event_handler = QuartoDocFileChangeHandler(callback=doc_build)
116121
observer = Observer()
117122
observer.schedule(event_handler, pkg_path, recursive=True)
123+
observer.schedule(event_handler, cfg_path, recursive=True)
118124
observer.start()
119125
try:
120126
while True:

0 commit comments

Comments
 (0)