Skip to content

Commit c7d779c

Browse files
committed
docs: switch markdown renderer [wip]
TODO: link targets need to be rewritten ("./foo.md" works on GitHub, but we'll need "/docs/foo"). Also, the path prefix should be injected into Handler(), which means deferring the markdown rendering to the start of the server.
1 parent 726bab5 commit c7d779c

File tree

9 files changed

+185
-83
lines changed

9 files changed

+185
-83
lines changed
File renamed without changes.

docs/docs.go

Lines changed: 103 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -3,126 +3,162 @@ package docs
33
import (
44
"bytes"
55
"embed"
6-
"fmt"
6+
"html/template"
77
"io"
8+
"log"
89
"net/http"
910
"strings"
1011

11-
"github.com/Depado/bfchroma/v2"
12-
"github.com/alecthomas/chroma/v2/formatters/html"
13-
bf "github.com/russross/blackfriday/v2"
12+
toc "github.com/abhinav/goldmark-toc"
13+
chromahtml "github.com/alecthomas/chroma/formatters/html"
14+
"github.com/digineo/texd"
15+
"github.com/microcosm-cc/bluemonday"
16+
"github.com/yuin/goldmark"
17+
highlighting "github.com/yuin/goldmark-highlighting"
18+
"github.com/yuin/goldmark/extension"
19+
"github.com/yuin/goldmark/parser"
20+
"github.com/yuin/goldmark/renderer/html"
21+
"github.com/yuin/goldmark/text"
1422
"gopkg.in/yaml.v3"
1523
)
1624

17-
//go:embed docs.yml *.md **/*.md
25+
//go:embed *.md **/*.md
1826
var sources embed.FS
1927

28+
//go:embed docs.yml
29+
var config []byte
30+
31+
//go:embed docs.html
32+
var rawLayout string
33+
var tplLayout = template.Must(template.New("layout").Parse(rawLayout))
34+
2035
type page struct {
2136
Title string
2237
Breadcrumbs []string
23-
Body string
38+
TOC *toc.TOC
39+
CSS []byte
40+
Body []byte
2441
File string
2542
Route string
2643
Children []*page
2744
}
45+
type pageRoutes map[string]*page
2846

29-
var root = func() page {
30-
structure, err := sources.Open("docs.yml")
31-
if err != nil {
32-
panic(err)
33-
}
34-
defer structure.Close()
35-
47+
var root, routes = func() (page, pageRoutes) {
3648
var menu page
37-
dec := yaml.NewDecoder(structure)
49+
dec := yaml.NewDecoder(bytes.NewReader(config))
3850
dec.KnownFields(true)
3951
if err := dec.Decode(&menu); err != nil {
4052
panic(err)
4153
}
4254

43-
menu.init()
44-
return menu
55+
r := make(pageRoutes)
56+
menu.init(r)
57+
return menu, r
4558
}()
4659

47-
func (pg *page) init(crumbs ...string) {
60+
func (pg *page) init(r pageRoutes, crumbs ...string) {
4861
if pg.File != "" {
49-
if r := strings.TrimSuffix(pg.File, ".md"); r == "index" {
62+
if r := strings.TrimSuffix(pg.File, ".md"); r == "README" {
5063
pg.Route = ""
5164
} else {
5265
pg.Route = "/" + r
5366
}
54-
67+
r[pg.Route] = pg
5568
pg.parseFile()
5669
}
5770
if pg.Title != "" {
58-
pg.Breadcrumbs = append(pg.Breadcrumbs, pg.Title)
71+
pg.Breadcrumbs = append([]string{pg.Title}, crumbs...)
5972
}
6073
for _, child := range pg.Children {
61-
child.init(pg.Breadcrumbs...)
74+
child.init(r, pg.Breadcrumbs...)
6275
}
6376
}
6477

78+
var sanitize = func() func(io.Reader) *bytes.Buffer {
79+
p := bluemonday.UGCPolicy()
80+
p.AllowAttrs("class").Globally()
81+
return p.SanitizeReader
82+
}()
83+
6584
func (pg *page) parseFile() {
66-
body, err := sources.ReadFile(pg.File)
85+
raw, err := sources.ReadFile(pg.File)
6786
if err != nil {
6887
panic(err)
6988
}
7089

71-
r := bfchroma.NewRenderer(
72-
bfchroma.WithoutAutodetect(),
73-
bfchroma.ChromaOptions(
74-
html.WithLineNumbers(true),
90+
var css, body bytes.Buffer
91+
md := goldmark.New(
92+
goldmark.WithParserOptions(
93+
parser.WithAutoHeadingID(),
94+
),
95+
goldmark.WithRendererOptions(
96+
html.WithUnsafe(),
97+
),
98+
goldmark.WithExtensions(
99+
extension.GFM,
100+
highlighting.NewHighlighting(
101+
highlighting.WithCSSWriter(&css),
102+
highlighting.WithStyle("github"),
103+
highlighting.WithFormatOptions(
104+
chromahtml.WithLineNumbers(true),
105+
chromahtml.WithClasses(true),
106+
),
107+
),
75108
),
76-
bfchroma.Extend(bf.NewHTMLRenderer(bf.HTMLRendererParameters{
77-
Flags: bf.CommonHTMLFlags & ^bf.UseXHTML & ^bf.CompletePage,
78-
})),
79-
)
80-
parser := bf.New(
81-
bf.WithExtensions(bf.CommonExtensions),
82-
bf.WithRenderer(r),
83109
)
84110

85-
ast := parser.Parse(body)
86-
var buf bytes.Buffer
87-
var inH1 bool
88-
89-
ast.Walk(func(node *bf.Node, entering bool) bf.WalkStatus {
90-
switch node.Type {
91-
case bf.Heading:
92-
inH1 = entering && node.HeadingData.Level == 1 && pg.Title == ""
93-
case bf.Text:
94-
if inH1 {
95-
pg.Title = string(node.Literal)
96-
}
97-
case bf.Link:
98-
if entering && bytes.HasPrefix(node.LinkData.Destination, []byte("./")) {
99-
node.LinkData.Destination = bytes.TrimSuffix(node.LinkData.Destination, []byte(".md"))
100-
}
111+
doc := md.Parser().Parse(text.NewReader(raw))
112+
tree, err := toc.Inspect(doc, raw)
113+
if err != nil {
114+
panic(err)
115+
}
116+
if pg.Title == "" {
117+
if len(tree.Items) > 0 {
118+
pg.Title = string(tree.Items[0].Title)
101119
}
102-
return r.RenderNode(&buf, node, entering)
103-
})
104-
105-
pg.Body = buf.String()
106-
}
107-
108-
func (pg *page) Dump(w io.Writer) {
109-
fmt.Fprintf(w, "- %s (%s)\n", pg.Title, pg.Route)
110-
fmt.Fprintln(w, pg.Body)
111-
fmt.Fprintln(w)
112-
113-
for _, c := range pg.Children {
114-
c.Dump(w)
115120
}
121+
if err := md.Renderer().Render(&body, raw, doc); err != nil {
122+
panic(err)
123+
}
124+
pg.TOC = tree
125+
pg.CSS = css.Bytes()
126+
pg.Body = sanitize(&body).Bytes()
116127
}
117128

118129
func Handler() http.Handler {
130+
type pageVars struct {
131+
Version string
132+
Title string
133+
CSS template.CSS
134+
Content template.HTML
135+
}
136+
119137
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
120-
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
121-
w.Header().Set("X-Content-Type-Options", "nosniff")
122-
w.WriteHeader(http.StatusOK)
138+
pg := routes[r.URL.Path]
139+
if pg == nil {
140+
http.NotFound(w, r)
141+
return
142+
}
123143

124-
fmt.Fprintf(w, "%#v\n\n", r.URL)
144+
var buf bytes.Buffer
145+
err := tplLayout.Execute(&buf, &pageVars{
146+
Version: texd.Version(),
147+
Title: strings.Join(pg.Breadcrumbs, " · "),
148+
CSS: template.CSS(pg.CSS),
149+
Content: template.HTML(pg.Body),
150+
})
151+
152+
if err != nil {
153+
log.Println(err)
154+
code := http.StatusInternalServerError
155+
http.Error(w, http.StatusText(code), code)
156+
return
157+
}
125158

126-
root.Dump(w)
159+
w.Header().Set("Content-Type", "text/html; charset=utf-8")
160+
w.Header().Set("X-Content-Type-Options", "nosniff")
161+
w.WriteHeader(http.StatusOK)
162+
_, _ = buf.WriteTo(w)
127163
})
128164
}

docs/docs.html

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>{{ .Title }}</title>
8+
9+
<link rel="stylesheet" href="/assets/bootstrap-5.1.3.min.css">
10+
<style>{{ .CSS }}</style>
11+
</head>
12+
13+
<body>
14+
<div id="app" class="pb-5">
15+
<nav class="navbar navbar-light navbar-expand-sm bg-light">
16+
<div class="container-fluid">
17+
<a href="https://github.com/digineo/texd" class="navbar-brand">texd</a>
18+
19+
<ul class="navbar-nav me-auto">
20+
<li class="nav-item">
21+
<a class="nav-link" href="/">Play</a>
22+
</li>
23+
<li class="nav-item">
24+
<a class="nav-link active" href="/docs">Documentation</a>
25+
</li>
26+
</ul>
27+
28+
<span class="navbar-text">
29+
{{ .Version }}
30+
</span>
31+
</div>
32+
</nav>
33+
34+
<div class="container">
35+
{{ .Content }}
36+
</div>
37+
</div>
38+
</body>
39+
</html>

docs/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
file: index.md
2+
file: README.md
33
children:
44
- file: operation-modes.md
55
- file: cli-options.md

go.mod

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,32 @@ module github.com/digineo/texd
33
go 1.18
44

55
require (
6-
github.com/Depado/bfchroma/v2 v2.0.0
7-
github.com/alecthomas/chroma/v2 v2.2.0
6+
github.com/abhinav/goldmark-toc v0.2.1
7+
github.com/alecthomas/chroma v0.10.0
88
github.com/bahlo/generic-list-go v0.2.0
99
github.com/bradfitz/gomemcache v0.0.0-20220106215444-fb4bf637b56d
1010
github.com/docker/docker v20.10.17+incompatible
1111
github.com/docker/go-units v0.4.0
1212
github.com/gorilla/handlers v1.5.1
1313
github.com/gorilla/mux v1.8.0
14+
github.com/microcosm-cc/bluemonday v1.0.19
1415
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6
1516
github.com/opencontainers/image-spec v1.0.2
1617
github.com/prometheus/client_golang v1.12.2
17-
github.com/russross/blackfriday/v2 v2.1.0
1818
github.com/spf13/afero v1.8.2
1919
github.com/spf13/pflag v1.0.5
2020
github.com/stretchr/testify v1.8.0
2121
github.com/thediveo/enumflag v0.10.1
22+
github.com/yuin/goldmark v1.4.13
23+
github.com/yuin/goldmark-highlighting v0.0.0-20220208100518-594be1970594
2224
go.uber.org/zap v1.21.0
2325
gopkg.in/yaml.v3 v3.0.1
2426
)
2527

2628
require (
2729
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
2830
github.com/Microsoft/go-winio v0.5.2 // indirect
31+
github.com/aymerick/douceur v0.2.0 // indirect
2932
github.com/beorn7/perks v1.0.1 // indirect
3033
github.com/cespare/xxhash/v2 v2.1.2 // indirect
3134
github.com/davecgh/go-spew v1.1.1 // indirect
@@ -36,6 +39,7 @@ require (
3639
github.com/gogo/protobuf v1.3.2 // indirect
3740
github.com/golang/protobuf v1.5.2 // indirect
3841
github.com/google/go-cmp v0.5.6 // indirect
42+
github.com/gorilla/css v1.0.0 // indirect
3943
github.com/kr/text v0.2.0 // indirect
4044
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
4145
github.com/morikuni/aec v1.0.0 // indirect

go.sum

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,21 @@ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOEl
4040
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
4141
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
4242
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
43-
github.com/Depado/bfchroma/v2 v2.0.0 h1:IRpN9BPkNwEpR6w1ectIcNWOuhDSLx+8f1pn83fzxx8=
44-
github.com/Depado/bfchroma/v2 v2.0.0/go.mod h1:wFwW/Pw8Tnd0irzgO9Zxtxgzp3aPS8qBWlyadxujxmw=
4543
github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA=
4644
github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=
4745
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
48-
github.com/alecthomas/chroma/v2 v2.2.0 h1:Aten8jfQwUqEdadVFFjNyjx7HTexhKP0XuqBG67mRDY=
49-
github.com/alecthomas/chroma/v2 v2.2.0/go.mod h1:vf4zrexSH54oEjJ7EdB65tGNHmH3pGZmVkgTP5RHvAs=
50-
github.com/alecthomas/repr v0.0.0-20220113201626-b1b626ac65ae h1:zzGwJfFlFGD94CyyYwCJeSuD32Gj9GTaSi5y9hoVzdY=
46+
github.com/abhinav/goldmark-toc v0.2.1 h1:QJsKKGbdVeCWYMB11hSkNuZLuIzls7Y4KBZfwTkBB90=
47+
github.com/abhinav/goldmark-toc v0.2.1/go.mod h1:aq1IZ9qN85uFYpowec98iJrFkEHYT4oeFD1SC0qd8d0=
48+
github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek=
49+
github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s=
5150
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
5251
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
5352
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
5453
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
5554
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
5655
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
56+
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
57+
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
5758
github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk=
5859
github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg=
5960
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
@@ -195,6 +196,8 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
195196
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
196197
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
197198
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
199+
github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY=
200+
github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c=
198201
github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4=
199202
github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q=
200203
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
@@ -239,6 +242,8 @@ github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czP
239242
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
240243
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI=
241244
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
245+
github.com/microcosm-cc/bluemonday v1.0.19 h1:OI7hoF5FY4pFz2VA//RN8TfM0YJ2dJcl4P4APrCWy6c=
246+
github.com/microcosm-cc/bluemonday v1.0.19/go.mod h1:QNzV2UbLK2/53oIIwTOyLUSABMkjZ4tqiyC1g/DyqxE=
242247
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
243248
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
244249
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc=
@@ -310,7 +315,6 @@ github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40T
310315
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
311316
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
312317
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
313-
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
314318
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
315319
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
316320
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
@@ -352,7 +356,13 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
352356
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
353357
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
354358
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
359+
github.com/yuin/goldmark v1.3.3/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
355360
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
361+
github.com/yuin/goldmark v1.4.5/go.mod h1:rmuwmfZ0+bvzB24eSC//bk1R1Zp3hM0OXYv/G2LIilg=
362+
github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE=
363+
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
364+
github.com/yuin/goldmark-highlighting v0.0.0-20220208100518-594be1970594 h1:yHfZyN55+5dp1wG7wDKv8HQ044moxkyGq12KFFMFDxg=
365+
github.com/yuin/goldmark-highlighting v0.0.0-20220208100518-594be1970594/go.mod h1:U9ihbh+1ZN7fR5Se3daSPoz1CGF9IYtSvWwVQtnzGHU=
356366
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
357367
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
358368
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=

service/assets/texd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const app = Vue.createApp({
6565
},
6666

6767
beforeMount() {
68-
setInterval(this.fetchStatus, 1000)
68+
setInterval(this.fetchStatus, 5000)
6969
this.fetchStatus()
7070
},
7171

0 commit comments

Comments
 (0)