Skip to content

v doc -theme-dir <directory> works - but only, if arguments are given in defined series #28115

Description

@MatthiasGottfried

While using the wrong series of the arguments the option -theme-dir of the command v doc is not working:

> v doc -f html -theme-dir theme ./main.v -o html_theme
vdoc: No valid V files were found. Skipping folder: /home/matthias/Dokumente/v/trials/doc/theme.
vdoc: No documentation found for /home/matthias/Dokumente/v/trials/doc/theme

Switching '-theme-dir theme' and './main.v' however works:

[matthias@infinitybook doc]$ v doc -f html ./l225.v -o html_theme -theme-dir theme
Copying    18032 bytes from `theme/doc.css` to `/home/matthias/Dokumente/v/trials/doc/html_theme/doc.css` ...
Copying     2091 bytes from `theme/normalize.css` to `/home/matthias/Dokumente/v/trials/doc/html_theme/normalize.css` ...
Copying    10895 bytes from `theme/doc.js` to `/home/matthias/Dokumente/v/trials/doc/html_theme/doc.js` ...
Copying      133 bytes from `theme/dark-mode.js` to `/home/matthias/Dokumente/v/trials/doc/html_theme/dark-mode.js` ...
Generating     4016 bytes of html in `/home/matthias/Dokumente/v/trials/doc/html_theme/main.html` ...
Creating search index...
Generating search_index.js of      158 bytes in `/home/matthias/Dokumente/v/trials/doc/html_theme/search_index.js ...
Copying favicons...
Copied 14 icons to `/home/matthias/Dokumente/v/trials/doc/html_theme` .

Acccording to claude.ai the fix is trivial:
Inside the parser cmd/tools/vdoc/main.v there is a i++ missing:

'-theme-dir' {
    cfg.theme_dir = cmdline.option(current_args, '-theme-dir', default_theme)
    // missing i++ !
}

Did not checked, if that's correct...

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions