💾 Archived View for code.pfad.fr › vanitydoc captured on 2023-07-10 at 13:12:28. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-05-24)

➡️ Next capture (2023-09-08)

🚧 View Differences

-=-=-=-=-=-=-

vanitydoc command - code.pfad.fr/vanitydoc

go install code.pfad.fr/vanitydoc

vanitydoc generates go documentation as a static site (HTML and Gemtext). When hosted at the package 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:

vanitydoc [flags] <forgeURL>

The forgeURL must specify the forge in the scheme. See [autodiscovery.ParseURL]

autodiscovery.ParseURL

gitea://git.example.com/folder
gitsrht://git.example.com/folder

The flags are:

-gemtext string
	Output folder for Gemtext
-html string
	Output folder for HTML (default "dist")
-moduleDir string
	Local path to the module to generate the documenation for (default ".")
-modulePath string
	Module path (will be read from go.mod if empty)

Example to generate this documentation

go run code.pfad.fr/vanitydoc@latest -html=dist/html -gemtext=dist/gmi gitea://codeberg.org/pfad.fr/vanitydoc

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 CSS styling is achieved using [simple.css] by default (available under MIT). It includes the [go-import] meta tag as well as the meta tags proposed by the [VCS Autodiscovery RFC]

gddo

simple.css

go-import

VCS Autodiscovery RFC

Bugs

Files

ideas.go

main.go

Directories

autodiscovery

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

pkg

package pkg computes and generate documentation for a given package.

Forge

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

git clone

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