aboutsummaryrefslogtreecommitdiffhomepage
path: root/create
diff options
context:
space:
mode:
Diffstat (limited to 'create')
-rw-r--r--create/content.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/create/content.go b/create/content.go
index 7f444f9df..914c16bec 100644
--- a/create/content.go
+++ b/create/content.go
@@ -137,8 +137,9 @@ func (b *contentBuilder) buildDir() error {
if !b.dirMap.siteUsed {
// We don't need to build everything.
contentInclusionFilter = glob.NewFilenameFilterForInclusionFunc(func(filename string) bool {
+ filename = strings.TrimPrefix(filename, string(os.PathSeparator))
for _, cn := range contentTargetFilenames {
- if strings.HasPrefix(cn, filename) {
+ if strings.Contains(cn, filename) {
return true
}
}
@@ -205,7 +206,8 @@ func (b *contentBuilder) buildFile() error {
if !usesSite {
// We don't need to build everything.
contentInclusionFilter = glob.NewFilenameFilterForInclusionFunc(func(filename string) bool {
- return strings.HasPrefix(contentPlaceholderAbsFilename, filename)
+ filename = strings.TrimPrefix(filename, string(os.PathSeparator))
+ return strings.Contains(contentPlaceholderAbsFilename, filename)
})
}