move to a hand written index page
This commit is contained in:
parent
593a8410ec
commit
8eeb02eafa
12
main.go
12
main.go
|
@ -364,24 +364,24 @@ func main() {
|
|||
panic(err)
|
||||
}
|
||||
}
|
||||
f, err := os.Create(filepath.Join(geminiOutputDir, "index.gmi"))
|
||||
f, err := os.Create(filepath.Join(geminiOutputDir, "_tags/_tags.gmi"))
|
||||
defer f.Close()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
err = templates.ExecuteTemplate(f, "index.gmi", tagData)
|
||||
err = templates.ExecuteTemplate(f, "_tags.gmi", tagData)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
f.Sync()
|
||||
|
||||
// Write out HTML index page
|
||||
hf, err := os.Create(filepath.Join(htmlOutputDir, "index.html"))
|
||||
// Write out HTML _tags page
|
||||
hf, err := os.Create(filepath.Join(htmlOutputDir, "_tags.html"))
|
||||
defer hf.Close()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
err = templates.ExecuteTemplate(hf, "index.html", tagData)
|
||||
err = templates.ExecuteTemplate(hf, "_tags.html", tagData)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
@ -465,7 +465,7 @@ func main() {
|
|||
err = ioutil.WriteFile(tagFile, j, 0644)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
j, err = json.Marshal(feed)
|
||||
err = ioutil.WriteFile(feedFile, j, 0644)
|
||||
if err != nil {
|
||||
|
|
Reference in New Issue