import "code.pfad.fr/vanitydoc/pkg"
package pkg computes and generate documentation for a given package.
func CopyAsset(dst io.Writer, name string) error
CopyAsset copy the given assets from the template folder.
func Gemtext(out io.Writer, pkg Package) error
Gemtext generates gemtext for the given Package.
type HTMLRenderer struct { // AdditionalFS and AdditionalPattern can be optionally provided // to override some components AdditionalFS fs.FS AdditionalPatterns []string }
func (hr HTMLRenderer) Render(out io.Writer, pkg Package) error
Render HTML for the given Package.
type Package struct { ModulePath string PackageChain []string VCS autodiscovery.VCS Stylesheets []string SubPackages []string SubSynopsis map[string]string // populated by calling ParseFS Doc *doc.Package // contains filtered or unexported fields }
Package holds the documentation data of a given package.
func (p *Package) ParseFS(subFS fs.FS) error
NewPackage computes Doc and FileSet fields for a package.
⚠ no idea how build tags should be managed
doc.go gemtext.go gemtext_comment.go html.go
https://codeberg.org/pfad.fr/vanitydoc
git clone
https://codeberg.org/pfad.fr/vanitydoc.git git@codeberg.org:pfad.fr/vanitydoc.git