updating to latest api

master
Stephen Searles 6 years ago
parent 84e4c70b47
commit 90c85e9310
  1. 2
      content.go
  2. 4
      hugo.go

@ -64,7 +64,7 @@ func GetContent(siteRoot string, sites *hugolib.HugoSites) ([]Content, error) {
page := sites.GetContentPage(fn) page := sites.GetContentPage(fn)
if page != nil { if page != nil {
files[i].Metadata = &Metadata{ files[i].Metadata = &Metadata{
Title: page.Title, Title: page.Title(),
Path: file.Filename, Path: file.Filename,
Date: page.Date, Date: page.Date,
Lastmod: page.Lastmod, Lastmod: page.Lastmod,

@ -13,7 +13,7 @@ import (
"github.com/spf13/afero" "github.com/spf13/afero"
"github.com/spf13/viper" "github.com/spf13/viper"
"git.stephensearles.com/stephen/caddy-hugo2/theme-additions" themeadditions "git.stephensearles.com/stephen/caddy-hugo2/theme-additions"
"git.stephensearles.com/stephen/idleshut" "git.stephensearles.com/stephen/idleshut"
) )
@ -82,7 +82,7 @@ func (ch *CaddyHugo) configWithFs(fs afero.Fs) (*hugolib.HugoSites, *deps.DepsCf
cfg := &deps.DepsCfg{Fs: hfs} cfg := &deps.DepsCfg{Fs: hfs}
cfgPath := path.Join(ch.Dir, "config.toml") cfgPath := path.Join(ch.Dir, "config.toml")
cfg.Cfg, err = hugolib.LoadConfig(fs, "", cfgPath) cfg.Cfg, _, err = hugolib.LoadConfig(hugolib.ConfigSourceDescriptor{Fs: fs, Path: cfgPath})
if err != nil { if err != nil {
return nil, cfg, fmt.Errorf("caddy-hugo: loading site configuration: %v", err) return nil, cfg, fmt.Errorf("caddy-hugo: loading site configuration: %v", err)
} }

Loading…
Cancel
Save