1
0
mirror of https://github.com/danog/gojekyll.git synced 2025-01-22 21:01:18 +01:00

Collection relative_directory doesn't include trailing slash

This commit is contained in:
Oliver Steele 2017-08-20 11:40:19 -04:00
parent 1855280bbd
commit eab849b27d

View File

@ -3,6 +3,7 @@ package collection
import ( import (
"fmt" "fmt"
"path/filepath" "path/filepath"
"strings"
"github.com/osteele/gojekyll/config" "github.com/osteele/gojekyll/config"
"github.com/osteele/gojekyll/pages" "github.com/osteele/gojekyll/pages"
@ -83,7 +84,7 @@ func (c *Collection) ToLiquid() interface{} {
"label": c.Name, "label": c.Name,
"docs": c.pages, "docs": c.pages,
"files": []string{}, "files": []string{},
"relative_directory": c.PathPrefix(), "relative_directory": strings.TrimSuffix(c.PathPrefix(), "/"),
"directory": c.AbsDir(), "directory": c.AbsDir(),
})) }))
} }