mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-10-30 09:23:09 +00:00
Fix index page for new sites
This commit is contained in:
parent
2e5ed347ea
commit
820ab25a26
4
main.go
4
main.go
|
@ -137,8 +137,8 @@ func newSite(name string) {
|
||||||
config, _ := builtin.ReadFile("config.toml")
|
config, _ := builtin.ReadFile("config.toml")
|
||||||
os.WriteFile(path.Join(name, "config.toml"), config, 0644)
|
os.WriteFile(path.Join(name, "config.toml"), config, 0644)
|
||||||
|
|
||||||
index := []byte("# Hello, world!\n")
|
index := []byte("---\ntitle: Hello, world!\n---\n")
|
||||||
os.WriteFile(path.Join(name, "content/index.gmi"), index, 0644)
|
os.WriteFile(path.Join(name, "content/_index.gmi"), index, 0644)
|
||||||
|
|
||||||
templates := []string{"atom.xml", "index.gmi", "page.gmi"}
|
templates := []string{"atom.xml", "index.gmi", "page.gmi"}
|
||||||
for _, template := range templates {
|
for _, template := range templates {
|
||||||
|
|
Loading…
Reference in a new issue