return nil
}
+ if fi.Mode()&os.ModeSymlink == os.ModeSymlink {
+ jww.ERROR.Printf("Symbolic links not supported, skipping '%s'", path)
+ return nil
+ }
+
if fi.IsDir() {
a = append(a, path)
}
import (
"bytes"
+ "github.com/spf13/hugo/helpers"
+ jww "github.com/spf13/jwalterweatherman"
"io"
"io/ioutil"
"os"
"path/filepath"
"strings"
-
- "github.com/spf13/hugo/helpers"
)
type Input interface {
return nil
}
+ if fi.Mode()&os.ModeSymlink == os.ModeSymlink {
+ jww.ERROR.Printf("Symbolic links not supported, skipping '%s'", filePath)
+ return nil
+ }
+
if fi.IsDir() {
if f.avoid(filePath) || isNonProcessablePath(filePath) {
return filepath.SkipDir
import (
"bytes"
"errors"
+ "github.com/eknkc/amber"
+ "github.com/spf13/cast"
+ "github.com/spf13/hugo/helpers"
+ jww "github.com/spf13/jwalterweatherman"
+ "github.com/yosssi/ace"
"html"
"html/template"
"io"
"reflect"
"strconv"
"strings"
-
- "github.com/eknkc/amber"
- "github.com/spf13/cast"
- "github.com/spf13/hugo/helpers"
- jww "github.com/spf13/jwalterweatherman"
- "github.com/yosssi/ace"
)
var localTemplates *template.Template
}
func (t *GoHtmlTemplate) GenerateTemplateNameFrom(base, path string) string {
- return filepath.ToSlash(path[len(base)+1:])
+ name, _ := filepath.Rel(base, path)
+ return filepath.ToSlash(name)
}
func ignoreDotFile(path string) bool {
return nil
}
+ if fi.Mode()&os.ModeSymlink == os.ModeSymlink {
+ jww.ERROR.Printf("Symbolic links not supported, skipping '%s'", absPath)
+ return nil
+ }
+
if !fi.IsDir() {
if ignoreDotFile(path) {
return nil