mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-10-30 01:13:08 +00:00
Move templates to templates/_default
This commit is contained in:
parent
535ec3752f
commit
de6b0258fc
4
main.go
4
main.go
|
@ -133,7 +133,7 @@ func copyAll(srcDir, dstDir string) error {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//go:embed templates config.toml
|
//go:embed templates/_default config.toml
|
||||||
var builtin embed.FS
|
var builtin embed.FS
|
||||||
|
|
||||||
func newSite(name string) {
|
func newSite(name string) {
|
||||||
|
@ -152,7 +152,7 @@ func newSite(name string) {
|
||||||
|
|
||||||
templates := []string{"atom.xml", "index.gmi", "page.gmi"}
|
templates := []string{"atom.xml", "index.gmi", "page.gmi"}
|
||||||
for _, template := range templates {
|
for _, template := range templates {
|
||||||
b, _ := builtin.ReadFile(path.Join("templates", template))
|
b, _ := builtin.ReadFile(path.Join("templates/_default", template))
|
||||||
os.WriteFile(path.Join(name, "templates/_default", template), b, 0644)
|
os.WriteFile(path.Join(name, "templates/_default", template), b, 0644)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue