vanitydoc command - code.pfad.fr/vanitydoc

vanitydoc generates go documentation as a static site (HTML and Gemtext). When served under the import path URL, it makes the package importable by the Go tools ("vanity import path").

For instance the import path for this command is code.pfad.fr/vanitydoc and the documentation is hosted at the following URL: [https://code.pfad.fr/vanitydoc]

https://code.pfad.fr/vanitydoc

Usage:

If the <path> argument points to a folder (or is omitted), a local HTTP server will be started to render the documentation on demand of the given folder (or the current folder), taking into account the following flags:

If the <path> argument points to a file (or "-" for stdin), the file is read as JSON, the configured modules are downloaded and their documentation generated.

Example to generate this documentation

The path to the JSON file containing the configuration should be given as argument to the executable. See the README for [configuration reference].

configuration reference

License and credits

Code is available under the BSD-3-Clause license.

Most of the templates originate from [gddo] (available under BSD-3-Clause). The default CSS styling is inspired by [simple.css] (available under MIT). [go-import] meta tag as well as the meta tags proposed by the [VCS Autodiscovery RFC] are included in the HTML output.

gddo

simple.css

go-import

VCS Autodiscovery RFC

Files

http.go

ideas.go

json.go

main.go

Directories

autodiscovery

package autodiscovery is an implementation of the [VCS Autodiscovery RFC].

template

package template generates documentation for a given package.

Forge

https://codeberg.org/pfad.fr/vanitydoc

git clone