• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mlange-42 / modo / 12816549311

16 Jan 2025 07:54PM CUT coverage: 34.117% (-3.0%) from 37.068%
12816549311

Pull #46

github

web-flow
Merge bad20b0e7 into cd52159d3
Pull Request #46: Fix overwritten cross-refs for multi re-export

0 of 105 new or added lines in 3 files covered. (0.0%)

450 of 1319 relevant lines covered (34.12%)

2.48 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/format/hugo.go
1
package format
2

3
import (
4
        "fmt"
5
        "path"
6

7
        "github.com/mlange-42/modo/document"
8
)
9

10
type HugoFormatter struct{}
11

12
const hugoFrontMatter = `+++
13
type = "docs"
14
title = "%s"
15
#summary = """%s"""
16
+++
17

18
%s
19
`
20

21
func (f *HugoFormatter) ProcessMarkdown(name, summary, text string) (string, error) {
×
22
        return fmt.Sprintf(hugoFrontMatter, name, summary, text), nil
×
23
}
×
24

25
func (f *HugoFormatter) WriteAuxiliary(p *document.Package, dir string, proc *document.Processor) error {
×
26
        return nil
×
27
}
×
28

29
func (f *HugoFormatter) ToFilePath(p string, kind string) (string, error) {
×
30
        if kind == "package" || kind == "module" {
×
31
                return path.Join(p, "_index.md"), nil
×
32
        }
×
33
        return p + ".md", nil
×
34
}
35

36
func (f *HugoFormatter) ToLinkPath(p string, kind string) (string, error) {
×
37
        return fmt.Sprintf("{{< ref \"%s\" >}}", p), nil
×
38
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc