Hugo fails to report error when theme directory is empty for a given theme. This is a problem for new users who are testing various themes for suitability and have followed documented procedures to load all themes which creates empty directories in some cases.
Entry specifying nixon theme where directory is empty:
hugo server -D --baseURL=“http://192.168.1.140/” --bind=“192.168.1.140” -t nixon --port=80
No apparent error thrown:
| EN
±-----------------±—+
Pages | 4
Paginator pages | 0
Non-page files | 0
Static files | 0
Processed images | 0
Aliases | 0
Sitemaps | 1
Cleaned | 0
Total in 31 ms
Watching for changes in /home/quickstart/{content,data,layouts,static}
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://192.168.1.140:80/ (bind address 192.168.1.140)
Press Ctrl+C to stop
End result for the user is a website which renders pre tags or 404. This also becomes confusing because browser sometimes retains previously loaded theme in cache and does not refresh unless ctrl f5 is issued.
Need to mention --debug does identify the issue among all the other lines.
WARN 2018/02/06 22:58:38 Unable to find Static Directory:
Would it be worth considering an enhancement to show an error when this condition occurs?