Browse Source

updating to latest api

Stephen Searles 4 months 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) {
64 64
 		page := sites.GetContentPage(fn)
65 65
 		if page != nil {
66 66
 			files[i].Metadata = &Metadata{
67
-				Title:   page.Title,
67
+				Title:   page.Title(),
68 68
 				Path:    file.Filename,
69 69
 				Date:    page.Date,
70 70
 				Lastmod: page.Lastmod,

+ 2
- 2
hugo.go View File

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

Loading…
Cancel
Save