mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-10-30 01:13:08 +00:00
Fix index page for new sites
This commit is contained in:
parent
5bfc0f7d77
commit
4b23a11d0b
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