tools: generate `index.html` instead of `.html` for `v doc -m -f html .`

pull/13052/head
Delyan Angelov 2022-01-06 04:05:23 +02:00
parent 3ae4513e2e
commit c97f0c59d1
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 3 additions and 0 deletions

View File

@ -156,6 +156,9 @@ fn (vd VDoc) get_file_name(mod string, out Output) string {
} else if !cfg.is_multi && !os.is_dir(out.path) {
name = os.file_name(out.path)
}
if name == '' {
name = 'index'
}
name = name + match out.typ {
.html { '.html' }
.markdown { '.md' }