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

mlange-42 / modo / 12810176069

16 Jan 2025 01:43PM CUT coverage: 36.569% (+1.8%) from 34.803%
12810176069

push

github

web-flow
Implement re-exports on package level (#42)

235 of 505 new or added lines in 11 files covered. (46.53%)

41 existing lines in 4 files now uncovered.

437 of 1195 relevant lines covered (36.57%)

2.65 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

NEW
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