Blog

Article Tags

Hua Orphans Mode

By William Jeffrey Rankin, Thu Feb 13 2025

Hua has an "orphans" mode that enables the identification of files that exist in the output directory but not in the entries file. Here's an example using the sample content files:

$ pwsh hua.ps1 example.cfg -O
orphan-1.html

As there may be perfectly valid reasons for the file to exist (e.g., a file referenced in generated content like a PDF or a download) Hua takes no action beyond listing the orphan filename.

It occurred to me this mode could also be used to look for orphans in the content directory. All that's required is to change the output_dir variable value in the Hua config file to the location of the content directory. In the example.cfg file change this:

...    
output_dir     =  .\blog
...

to this:

...    
output_dir     =  .\content
...

and run Hua in the same way as above. Content is not processed in orphans mode. Don't forget to change output_dir to its prior value!