@@ -94,12 +94,10 @@ def __init__(
9494 "version" : quarto_inspection .get ("quarto" , {}).get ("version" , "99.9.9" ),
9595 "engines" : quarto_inspection .get ("engines" , []),
9696 }
97- project_config = quarto_inspection .get ("config" , {}).get ("project" , {})
98- render_targets = project_config .get ("render" , [])
99- if len (render_targets ):
100- self .data ["metadata" ]["primary_rmd" ] = render_targets [0 ]
101- project_type = project_config .get ("type" , None )
102- if project_type or len (render_targets ) > 1 :
97+
98+ files_data = quarto_inspection .get ("files" , {})
99+ files_input_data = files_data .get ("input" , [])
100+ if len (files_input_data ) > 1 :
103101 self .data ["metadata" ]["content_category" ] = "site"
104102
105103 if environment :
@@ -325,12 +323,10 @@ def make_source_manifest(
325323 "version" : quarto_inspection .get ("quarto" , {}).get ("version" , "99.9.9" ),
326324 "engines" : quarto_inspection .get ("engines" , []),
327325 }
328- project_config = quarto_inspection .get ("config" , {}).get ("project" , {})
329- render_targets = project_config .get ("render" , [])
330- if len (render_targets ):
331- manifest ["metadata" ]["primary_rmd" ] = render_targets [0 ]
332- project_type = project_config .get ("type" , None )
333- if project_type or len (render_targets ) > 1 :
326+
327+ files_data = quarto_inspection .get ("files" , {})
328+ files_input_data = files_data .get ("input" , [])
329+ if len (files_input_data ) > 1 :
334330 manifest ["metadata" ]["content_category" ] = "site"
335331
336332 if environment :
@@ -1303,13 +1299,19 @@ def make_quarto_manifest(
13031299 output_dir = project_config .get ("output-dir" , None )
13041300 if output_dir :
13051301 excludes = excludes + [output_dir ]
1306- else :
1307- render_targets = project_config .get ("render" , [])
1308- for target in render_targets :
1309- t , _ = splitext (target )
1310- # TODO: Single-file inspect would give inspect.formats.html.pandoc.output-file
1311- # For foo.qmd, we would get an output-file=foo.html, but foo_files is not available.
1312- excludes = excludes + [t + ".html" , t + "_files" ]
1302+
1303+ files_data = quarto_inspection .get ("files" , {})
1304+ files_input_data = files_data .get ("input" , [])
1305+ # files.input is a list of absolute paths to input (rendered)
1306+ # files. Automatically ignore the most common derived files for
1307+ # those inputs.
1308+ #
1309+ # These files are ignored even when the project has an output
1310+ # directory, as Quarto may create these files while a render is
1311+ # in-flight.
1312+ for each in files_input_data :
1313+ t , _ = splitext (os .path .relpath (each , file_or_directory ))
1314+ excludes = excludes + [t + ".html" , t + "_files/**" ]
13131315
13141316 # relevant files don't need to include requirements.txt file because it is
13151317 # always added to the manifest (as a buffer) from the environment contents
0 commit comments