mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
all: Remove dead code
This commit is contained in:
parent
766c82a6bb
commit
8fa871a05f
4 changed files with 0 additions and 33 deletions
|
@ -114,17 +114,6 @@ func (i item) String() string {
|
||||||
|
|
||||||
type itemType int
|
type itemType int
|
||||||
|
|
||||||
// named params in shortcodes
|
|
||||||
type namedParam struct {
|
|
||||||
name string
|
|
||||||
value string
|
|
||||||
}
|
|
||||||
|
|
||||||
// for testing
|
|
||||||
func (np namedParam) String() string {
|
|
||||||
return fmt.Sprintf("%s=%s", np.name, np.value)
|
|
||||||
}
|
|
||||||
|
|
||||||
const (
|
const (
|
||||||
tError itemType = iota
|
tError itemType = iota
|
||||||
tEOF
|
tEOF
|
||||||
|
|
|
@ -1012,14 +1012,6 @@ func (s *Site) absThemeDir() string {
|
||||||
return helpers.AbsPathify(s.themeDir())
|
return helpers.AbsPathify(s.themeDir())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Site) isThemeDirEvent(e fsnotify.Event) bool {
|
|
||||||
return s.getThemeDir(e.Name) != ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *Site) getThemeDir(path string) string {
|
|
||||||
return getRealDir(s.absThemeDir(), path)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *Site) layoutDir() string {
|
func (s *Site) layoutDir() string {
|
||||||
return viper.GetString("LayoutDir")
|
return viper.GetString("LayoutDir")
|
||||||
}
|
}
|
||||||
|
@ -1768,7 +1760,6 @@ func (s *Site) newTaxonomyNode(prepare bool, t taxRenderInfo, counter int) (*Nod
|
||||||
}
|
}
|
||||||
|
|
||||||
if s.Info.preserveTaxonomyNames {
|
if s.Info.preserveTaxonomyNames {
|
||||||
key = helpers.MakePathSanitized(key)
|
|
||||||
// keep as is in the title
|
// keep as is in the title
|
||||||
n.Title = t.key
|
n.Title = t.key
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -43,7 +43,6 @@ var fakeSource = []source.ByteSource{
|
||||||
}
|
}
|
||||||
|
|
||||||
func checkShowPlanExpected(t *testing.T, s *Site, expected string) {
|
func checkShowPlanExpected(t *testing.T, s *Site, expected string) {
|
||||||
|
|
||||||
out := new(bytes.Buffer)
|
out := new(bytes.Buffer)
|
||||||
if err := s.ShowPlan(out); err != nil {
|
if err := s.ShowPlan(out); err != nil {
|
||||||
t.Fatalf("ShowPlan unexpectedly returned an error: %s", err)
|
t.Fatalf("ShowPlan unexpectedly returned an error: %s", err)
|
||||||
|
|
|
@ -23,7 +23,6 @@ import (
|
||||||
|
|
||||||
"github.com/spf13/hugo/hugofs"
|
"github.com/spf13/hugo/hugofs"
|
||||||
"github.com/spf13/hugo/source"
|
"github.com/spf13/hugo/source"
|
||||||
"github.com/spf13/hugo/target"
|
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -44,17 +43,6 @@ func must(err error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type InMemoryAliasTarget struct {
|
|
||||||
target.HTMLRedirectAlias
|
|
||||||
files map[string][]byte
|
|
||||||
}
|
|
||||||
|
|
||||||
func (t *InMemoryAliasTarget) Publish(label string, permalink template.HTML) (err error) {
|
|
||||||
f, _ := t.Translate(label)
|
|
||||||
t.files[f] = []byte("--dummy text--")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
var urlFakeSource = []source.ByteSource{
|
var urlFakeSource = []source.ByteSource{
|
||||||
{Name: filepath.FromSlash("content/blue/doc1.md"), Content: []byte(slugDoc1)},
|
{Name: filepath.FromSlash("content/blue/doc1.md"), Content: []byte(slugDoc1)},
|
||||||
{Name: filepath.FromSlash("content/blue/doc2.md"), Content: []byte(slugDoc2)},
|
{Name: filepath.FromSlash("content/blue/doc2.md"), Content: []byte(slugDoc2)},
|
||||||
|
|
Loading…
Reference in a new issue