mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
parent
85bcac530a
commit
05b888877d
3 changed files with 11 additions and 2 deletions
|
@ -15,13 +15,18 @@ package hugolib
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/spf13/hugo/helpers"
|
|
||||||
"html/template"
|
"html/template"
|
||||||
|
|
||||||
|
"github.com/spf13/hugo/helpers"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
// CommitHash contains the current Git revision. Use make to build to make
|
||||||
|
// sure this gets set.
|
||||||
CommitHash string
|
CommitHash string
|
||||||
BuildDate string
|
|
||||||
|
// BuildDate contains the date of the current build.
|
||||||
|
BuildDate string
|
||||||
)
|
)
|
||||||
|
|
||||||
var hugoInfo *HugoInfo
|
var hugoInfo *HugoInfo
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
package hugolib
|
package hugolib
|
||||||
|
|
||||||
|
// Prev returns the previous page reletive to the given page.
|
||||||
func (p Pages) Prev(cur *Page) *Page {
|
func (p Pages) Prev(cur *Page) *Page {
|
||||||
for x, c := range p {
|
for x, c := range p {
|
||||||
if c.UniqueID() == cur.UniqueID() {
|
if c.UniqueID() == cur.UniqueID() {
|
||||||
|
@ -25,6 +26,7 @@ func (p Pages) Prev(cur *Page) *Page {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Next returns the next page reletive to the given page.
|
||||||
func (p Pages) Next(cur *Page) *Page {
|
func (p Pages) Next(cur *Page) *Page {
|
||||||
for x, c := range p {
|
for x, c := range p {
|
||||||
if c.UniqueID() == cur.UniqueID() {
|
if c.UniqueID() == cur.UniqueID() {
|
||||||
|
|
|
@ -18,6 +18,8 @@ import (
|
||||||
"io"
|
"io"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// ShowPlan prints a build plan to the given Writer.
|
||||||
|
// Useful for debugging.
|
||||||
func (s *Site) ShowPlan(out io.Writer) (err error) {
|
func (s *Site) ShowPlan(out io.Writer) (err error) {
|
||||||
if s.Source == nil || len(s.Source.Files()) <= 0 {
|
if s.Source == nil || len(s.Source.Files()) <= 0 {
|
||||||
fmt.Fprintf(out, "No source files provided.\n")
|
fmt.Fprintf(out, "No source files provided.\n")
|
||||||
|
|
Loading…
Reference in a new issue