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

mlange-42 / modo / 12811333482

16 Jan 2025 02:46PM CUT coverage: 37.068% (+0.2%) from 36.851%
12811333482

Pull #44

github

web-flow
Merge 29af9681f into 6f7c9c303
Pull Request #44: Improve code structure

26 of 94 new or added lines in 5 files covered. (27.66%)

12 existing lines in 2 files now uncovered.

450 of 1214 relevant lines covered (37.07%)

2.7 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