Add leading /s in prerenderrc generator.

This commit is contained in:
Dillon Kearns 2019-07-23 09:01:31 -07:00
parent 12c9af08dc
commit 81cd85997b

View File

@ -33,6 +33,7 @@ prerenderRcFormattedPath pageOrPost =
|> dropIndexFromLast |> dropIndexFromLast
|> List.drop 1 |> List.drop 1
|> String.join "/" |> String.join "/"
|> (\path -> "/" ++ path)
dropIndexFromLast : List String -> List String dropIndexFromLast : List String -> List String
@ -56,7 +57,7 @@ preRenderRc extras =
|> List.map prerenderRcFormattedPath |> List.map prerenderRcFormattedPath
|> List.map (\path -> String.concat [ "\"", path, "\"" ]) |> List.map (\path -> String.concat [ "\"", path, "\"" ])
|> String.join ", " |> String.join ", "
|> (\paths -> String.concat [ "[", paths, "]" ]) |> (\paths -> String.concat [ "[", paths, "]\n" ])
pathFor : PageOrPost -> String pathFor : PageOrPost -> String