From eab849b27d622abec7b3ac016da755c65ba175a1 Mon Sep 17 00:00:00 2001 From: Oliver Steele Date: Sun, 20 Aug 2017 11:40:19 -0400 Subject: [PATCH] Collection relative_directory doesn't include trailing slash --- collection/collection.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/collection/collection.go b/collection/collection.go index e7f8062..4eb8c95 100644 --- a/collection/collection.go +++ b/collection/collection.go @@ -3,6 +3,7 @@ package collection import ( "fmt" "path/filepath" + "strings" "github.com/osteele/gojekyll/config" "github.com/osteele/gojekyll/pages" @@ -83,7 +84,7 @@ func (c *Collection) ToLiquid() interface{} { "label": c.Name, "docs": c.pages, "files": []string{}, - "relative_directory": c.PathPrefix(), + "relative_directory": strings.TrimSuffix(c.PathPrefix(), "/"), "directory": c.AbsDir(), })) }