diff options
| author | Garrett D'Amore <garrett@damore.org> | 2023-09-14 00:27:53 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2023-09-14 00:27:53 -0700 |
| commit | 01dd3b1b352f18a968f13b57fed1783e95001783 (patch) | |
| tree | f0da834cbe8e83c2fa542d5d88035f8a63212690 /etc/pubrefman/pubrefman.go | |
| parent | 5ac5be5cacacdb8d6cac2fa362fce6d78e4dc389 (diff) | |
| download | nng-01dd3b1b352f18a968f13b57fed1783e95001783.tar.gz nng-01dd3b1b352f18a968f13b57fed1783e95001783.tar.bz2 nng-01dd3b1b352f18a968f13b57fed1783e95001783.zip | |
fixes #1687 Generated HTML documentation title tags are empty
This also updates libascii and go-get dependencies to allow the
pubrefman tool to work again.
Diffstat (limited to 'etc/pubrefman/pubrefman.go')
| -rw-r--r-- | etc/pubrefman/pubrefman.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/etc/pubrefman/pubrefman.go b/etc/pubrefman/pubrefman.go index 9ed3f5af..142a484d 100644 --- a/etc/pubrefman/pubrefman.go +++ b/etc/pubrefman/pubrefman.go @@ -89,7 +89,7 @@ type Global struct { SrcFs billy.Filesystem DstFs billy.Filesystem DstDir string - LaConfig configuration.Configuration + LaConfig *configuration.Configuration Sections map[string]*Section Pages map[string]*Page Repo *git.Repository @@ -111,14 +111,13 @@ func (g *Global) Init() { g.SrcFs = memfs.New() g.DstFs = memfs.New() g.DstDir = path.Join("man", g.Config.Version) - g.LaConfig = configuration.Configuration{ - AttributeOverrides: map[string]string{ + g.LaConfig = configuration.NewConfiguration( + configuration.WithAttributes(map[string]interface{}{ "nofooter": "yes", "icons": "font", "linkcss": "yes", "source-highlighter": "pygments", - }, - } + })) thresh := jww.LevelInfo if g.Config.Quiet { thresh = jww.LevelError @@ -232,6 +231,7 @@ func (g *Global) ProcessManPage(page os.FileInfo) { _, _ = fmt.Fprintf(result, "---\n") _, _ = fmt.Fprintf(result, "version: %s\n", g.Config.Version) _, _ = fmt.Fprintf(result, "layout: %s\n", "manpage_v2") + _, _ = fmt.Fprintf(result, "title: %s\n", fmt.Sprintf("%s(%s)", name, sect)) _, _ = fmt.Fprintf(result, "---\n") _, _ = fmt.Fprintf(result, "<h1>%s(%s)</h1>\n", name, sect) result.WriteString(html.String()) @@ -427,7 +427,7 @@ func (g *Global) Push() { }) g.CheckError(err, "getting commit log") commit, err := ci.Next() - g.CheckError(err,"getting single commit") + g.CheckError(err, "getting single commit") if commit != nil { g.Print(commit.String()) if fs, _ := commit.Stats(); fs != nil { |
