From c97f0c59d15e1c433f3359a49f8595a9f24cc3dc Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Thu, 6 Jan 2022 04:05:23 +0200 Subject: [PATCH] tools: generate `index.html` instead of `.html` for `v doc -m -f html .` --- cmd/tools/vdoc/vdoc.v | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/tools/vdoc/vdoc.v b/cmd/tools/vdoc/vdoc.v index cb4ddb11e1..5cabe6a7fd 100644 --- a/cmd/tools/vdoc/vdoc.v +++ b/cmd/tools/vdoc/vdoc.v @@ -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' }