From 0fe344a1a9ca63718c69a931803e71ca61df7728 Mon Sep 17 00:00:00 2001 From: Kirill Zhuravlev Date: Mon, 20 Feb 2023 21:24:47 +0100 Subject: [PATCH] rename templates --- .gitignore | 2 -- main.go | 6 +++--- tmpl/{cat-tmpl.html => category-index.tmpl.html} | 0 tmpl/{tmpl.html => index.tmpl.html} | 0 tmpl/{sitemap-tmpl.xml => sitemap.tmpl.xml} | 0 5 files changed, 3 insertions(+), 5 deletions(-) rename tmpl/{cat-tmpl.html => category-index.tmpl.html} (100%) rename tmpl/{tmpl.html => index.tmpl.html} (100%) rename tmpl/{sitemap-tmpl.xml => sitemap.tmpl.xml} (100%) diff --git a/.gitignore b/.gitignore index 93865a2a..c43b1528 100644 --- a/.gitignore +++ b/.gitignore @@ -8,5 +8,3 @@ test_stale_repositories_log *.exe # Local Netlify folder .netlify -*.html -sitemap.xml diff --git a/main.go b/main.go index 54e3389e..000e94ac 100644 --- a/main.go +++ b/main.go @@ -38,9 +38,9 @@ var staticFiles = []string{ // TODO: embed // Templates -var tplIndex = template.Must(template.ParseFiles("tmpl/tmpl.html")) -var tplCategoryIndex = template.Must(template.ParseFiles("tmpl/cat-tmpl.html")) -var tplSitemap = template.Must(template.ParseFiles("tmpl/sitemap-tmpl.xml")) +var tplIndex = template.Must(template.ParseFiles("tmpl/index.tmpl.html")) +var tplCategoryIndex = template.Must(template.ParseFiles("tmpl/category-index.tmpl.html")) +var tplSitemap = template.Must(template.ParseFiles("tmpl/sitemap.tmpl.xml")) // Output files const outDir = "out/" // NOTE: trailing slash is required diff --git a/tmpl/cat-tmpl.html b/tmpl/category-index.tmpl.html similarity index 100% rename from tmpl/cat-tmpl.html rename to tmpl/category-index.tmpl.html diff --git a/tmpl/tmpl.html b/tmpl/index.tmpl.html similarity index 100% rename from tmpl/tmpl.html rename to tmpl/index.tmpl.html diff --git a/tmpl/sitemap-tmpl.xml b/tmpl/sitemap.tmpl.xml similarity index 100% rename from tmpl/sitemap-tmpl.xml rename to tmpl/sitemap.tmpl.xml