From de6b0258fcfb032b93c5f440c7ace1fae57f9b8a Mon Sep 17 00:00:00 2001 From: adnano Date: Mon, 10 May 2021 15:03:02 -0400 Subject: [PATCH] Move templates to templates/_default --- main.go | 4 ++-- templates/{ => _default}/atom.xml | 0 templates/{ => _default}/index.gmi | 0 templates/{ => _default}/page.gmi | 0 4 files changed, 2 insertions(+), 2 deletions(-) rename templates/{ => _default}/atom.xml (100%) rename templates/{ => _default}/index.gmi (100%) rename templates/{ => _default}/page.gmi (100%) diff --git a/main.go b/main.go index 3568918..d75b696 100644 --- a/main.go +++ b/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 func newSite(name string) { @@ -152,7 +152,7 @@ func newSite(name string) { templates := []string{"atom.xml", "index.gmi", "page.gmi"} 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) } } diff --git a/templates/atom.xml b/templates/_default/atom.xml similarity index 100% rename from templates/atom.xml rename to templates/_default/atom.xml diff --git a/templates/index.gmi b/templates/_default/index.gmi similarity index 100% rename from templates/index.gmi rename to templates/_default/index.gmi diff --git a/templates/page.gmi b/templates/_default/page.gmi similarity index 100% rename from templates/page.gmi rename to templates/_default/page.gmi