summaryrefslogtreecommitdiffstats
path: root/hugolib
diff options
context:
space:
mode:
authorAnthony Fok <foka@debian.org>2015-07-30 01:17:10 -0600
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2015-07-30 13:33:38 +0200
commit252ea96d1d359b485bae489327a8219d102f0607 (patch)
tree7a0f13dc4f1396c63eef1425b71ca887ca7b5a6c /hugolib
parentb23b546a30df792ad2c8f0cf3ec1be30c53ba34d (diff)
Remove deprecated fields and methods for v0.15
Special thanks to @bep for his guidance and for making sure all of the Hugo themes get updated. Fixes #1172
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/menu.go7
-rw-r--r--hugolib/node.go20
-rw-r--r--hugolib/pagination.go6
-rw-r--r--hugolib/pagination_test.go1
-rw-r--r--hugolib/site.go18
5 files changed, 0 insertions, 52 deletions
diff --git a/hugolib/menu.go b/hugolib/menu.go
index 95370062b..322e9c7d5 100644
--- a/hugolib/menu.go
+++ b/hugolib/menu.go
@@ -19,7 +19,6 @@ import (
"strings"
"github.com/spf13/cast"
- "github.com/spf13/hugo/helpers"
)
type MenuEntry struct {
@@ -38,12 +37,6 @@ type Menu []*MenuEntry
type Menus map[string]*Menu
type PageMenus map[string]*MenuEntry
-// Url is deprecated. Will be removed in 0.15.
-func (me *MenuEntry) Url() string {
- helpers.Deprecated("MenuEntry", ".Url", ".URL")
- return me.URL
-}
-
func (me *MenuEntry) AddChild(child *MenuEntry) {
me.Children = append(me.Children, child)
me.Children.Sort()
diff --git a/hugolib/node.go b/hugolib/node.go
index ecf5e32fa..f8f8df594 100644
--- a/hugolib/node.go
+++ b/hugolib/node.go
@@ -17,8 +17,6 @@ import (
"html/template"
"sync"
"time"
-
- "github.com/spf13/hugo/helpers"
)
type Node struct {
@@ -134,24 +132,6 @@ type URLPath struct {
Section string
}
-// Url is deprecated. Will be removed in 0.15.
-func (n *Node) Url() string {
- helpers.Deprecated("Node", ".Url", ".URL")
- return n.URL
-}
-
-// UrlPath is deprecated. Will be removed in 0.15.
-func (n *Node) UrlPath() URLPath {
- helpers.Deprecated("Node", ".UrlPath", ".URLPath")
- return n.URLPath
-}
-
-// Url is deprecated. Will be removed in 0.15.
-func (up URLPath) Url() string {
- helpers.Deprecated("URLPath", ".Url", ".URL")
- return up.URL
-}
-
// Scratch returns the writable context associated with this Node.
func (n *Node) Scratch() *Scratch {
if n.scratch == nil {
diff --git a/hugolib/pagination.go b/hugolib/pagination.go
index 2f8d87621..acd406ed1 100644
--- a/hugolib/pagination.go
+++ b/hugolib/pagination.go
@@ -74,12 +74,6 @@ func (p *Pager) URL() template.HTML {
return template.HTML(p.paginationURLFactory(p.PageNumber()))
}
-// Url is deprecated. Will be removed in 0.15.
-func (p *Pager) Url() template.HTML {
- helpers.Deprecated("Paginator", ".Url", ".URL")
- return p.URL()
-}
-
// Pages returns the Pages on this page.
// Note: If this return a non-empty result, then PageGroups() will return empty.
func (p *Pager) Pages() Pages {
diff --git a/hugolib/pagination_test.go b/hugolib/pagination_test.go
index 635608cdd..b806a10e0 100644
--- a/hugolib/pagination_test.go
+++ b/hugolib/pagination_test.go
@@ -107,7 +107,6 @@ func doTestPages(t *testing.T, paginator *paginator) {
first := paginatorPages[0]
assert.Equal(t, template.HTML("page/1/"), first.URL())
- assert.Equal(t, first.URL(), first.Url())
assert.Equal(t, first, first.First())
assert.True(t, first.HasNext())
assert.Equal(t, paginatorPages[1], first.Next())
diff --git a/hugolib/site.go b/hugolib/site.go
index 4457e1050..b61397a99 100644
--- a/hugolib/site.go
+++ b/hugolib/site.go
@@ -132,24 +132,6 @@ type SiteInfo struct {
// linkedin
type SiteSocial map[string]string
-// BaseUrl is deprecated. Will be removed in 0.15.
-func (s *SiteInfo) BaseUrl() template.URL {
- helpers.Deprecated("Site", ".BaseUrl", ".BaseURL")
- return s.BaseURL
-}
-
-// Recent is deprecated. Will be removed in 0.15.
-func (s *SiteInfo) Recent() *Pages {
- helpers.Deprecated("Site", ".Recent", ".Pages")
- return s.Pages
-}
-
-// Indexes is deprecated. Will be removed in 0.15.
-func (s *SiteInfo) Indexes() *TaxonomyList {
- helpers.Deprecated("Site", ".Indexes", ".Taxonomies")
- return &s.Taxonomies
-}
-
func (s *SiteInfo) GetParam(key string) interface{} {
v := s.Params[strings.ToLower(key)]