mirror of
https://github.com/danog/gojekyll.git
synced 2025-01-23 00:01:14 +01:00
Collection relative_directory doesn't include trailing slash
This commit is contained in:
parent
1855280bbd
commit
eab849b27d
@ -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(),
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user