Skip to content

Commit

Permalink
build: switch back to html
Browse files Browse the repository at this point in the history
  • Loading branch information
butuzov committed Dec 18, 2023
1 parent fb15e5a commit e35272f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions templates/example.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
onkeydown = (e) => {
{{if .PrevExample}}
if (e.key == "ArrowLeft") {
window.location.href = '{{.PrevExample.ID}}';
window.location.href = '{{.PrevExample.ID}}.html';
}
{{end}}
{{if .NextExample}}
if (e.key == "ArrowRight") {
window.location.href = '{{.NextExample.ID}}';
window.location.href = '{{.NextExample.ID}}.html';
}
{{end}}
}
Expand All @@ -39,7 +39,7 @@
{{end}}
{{if .NextExample}}
<p class="next">
Наступний приклад: <a href="{{.NextExample.ID}}">{{.NextExample.Name}}</a>.
Наступний приклад: <a href="{{.NextExample.ID}}.html">{{.NextExample.Name}}</a>.
</p>
{{end}}
{{ template "footer" }}
Expand Down
2 changes: 1 addition & 1 deletion templates/index.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

<ul>
{{range .}}
<li><a href="{{.ID}}">{{.Name}}</a></li>
<li><a href="{{.ID}}.html>{{.Name}}</a></li>
{{end}}
</ul>
{{ template "footer" }}
Expand Down
2 changes: 1 addition & 1 deletion tools/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ func renderExamples(examples []*Example) {
template.Must(exampleTmpl.Parse(mustReadFile("templates/footer.tmpl")))
template.Must(exampleTmpl.Parse(mustReadFile("templates/example.tmpl")))
for _, example := range examples {
exampleF, err := os.Create(siteDir + "/" + example.ID)
exampleF, err := os.Create(siteDir + "/" + example.ID + ".html")
check(err)
defer exampleF.Close()
check(exampleTmpl.Execute(exampleF, example))
Expand Down

0 comments on commit e35272f

Please sign in to comment.