From a4b3d3d35efe45ef910cf7963fb651b8c9506697 Mon Sep 17 00:00:00 2001 From: "Collin J. Doering" Date: Fri, 14 Aug 2015 01:58:09 -0400 Subject: [PATCH] Moved pages/home.markdown to pages/index.markdown This removes a special case when generating the pages. Namely having to change the route of "pages/home.markdown" to "pages/index.markdown" before being converted to its final route of "/index.html". Note: Because "pages/home.markdown" was renamed, its template "templates/pages/home.html" has also been renamed to "templates/pages/index.html". Signed-off-by: Collin J. Doering --- pages/{home.markdown => index.markdown} | 0 src/site.hs | 5 +---- templates/pages/{home.html => index.html} | 0 3 files changed, 1 insertion(+), 4 deletions(-) rename pages/{home.markdown => index.markdown} (100%) rename templates/pages/{home.html => index.html} (100%) diff --git a/pages/home.markdown b/pages/index.markdown similarity index 100% rename from pages/home.markdown rename to pages/index.markdown diff --git a/src/site.hs b/src/site.hs index cd6c42b..c347707 100644 --- a/src/site.hs +++ b/src/site.hs @@ -187,10 +187,7 @@ main = do -- Generate tag pages paginateTagsRules "tags" tags - let navgenRoute = customRoute (\r -> if toFilePath r == "pages/home.markdown" - then "pages/index.markdown" - else toFilePath r) `composeRoutes` - gsubRoute "pages/" (const "") `composeRoutes` + let navgenRoute = gsubRoute "pages/" (const "") `composeRoutes` setExtension "html" match "pages/*" $ version "nav-gen" $ do diff --git a/templates/pages/home.html b/templates/pages/index.html similarity index 100% rename from templates/pages/home.html rename to templates/pages/index.html