Browse Source

updating to latest api

master
Stephen Searles 1 year ago
parent
commit
90c85e9310
2 changed files with 3 additions and 3 deletions
  1. 1
    1
      content.go
  2. 2
    2
      hugo.go

+ 1
- 1
content.go View File

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

+ 2
- 2
hugo.go View File

@@ -13,7 +13,7 @@ import (
"github.com/spf13/afero"
"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"
)

@@ -82,7 +82,7 @@ func (ch *CaddyHugo) configWithFs(fs afero.Fs) (*hugolib.HugoSites, *deps.DepsCf
cfg := &deps.DepsCfg{Fs: hfs}

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 {
return nil, cfg, fmt.Errorf("caddy-hugo: loading site configuration: %v", err)
}

Loading…
Cancel
Save