Hugo Octopress theme: error calling first: both limit and seq must be provided

Good day everyone. Trying to use octopress theme

c:\hugo\Sites\example.com>hugo server --theme=Hugo-Octopress --buildDrafts Started building site **ERROR**: 2016/08/15 15:21:03 template.go:131: template: theme/partials/sidebar.htm l:64:17: executing "theme/partials/sidebar.html" at <first .Site.Params.s...>: e rror calling first: both limit and seq must be provided in theme/partials/sideba r.html **ERROR**: 2016/08/15 15:21:03 template.go:131: template: theme/partials/sidebar.htm l:64:17: executing "theme/partials/sidebar.html" at <first .Site.Params.s...>: e rror calling first: both limit and seq must be provided in theme/partials/sideba r.html **ERROR**: 2016/08/15 15:21:03 template.go:131: template: theme/partials/sidebar.htm l:64:17: executing "theme/partials/sidebar.html" at <first .Site.Params.s...>: e rror calling first: both limit and seq must be provided in theme/partials/sideba r.html 1 of 1 draft rendered 0 future content 1 pages created 0 non-page files copied 1 paginator pages created 0 tags created 0 categories created in 39 ms Watching for changes in c:\hugo\Sites\example.com\{data,content,layouts,static,t hemes} Serving pages from memory Web Server is available at http://localhost:1313/ (bind address 127.0.0.1) Press Ctrl+C to stop

how can i fix this problem?

(theme http://themes.gohugo.io/hugo-octopress/
git https://github.com/parsiya/Hugo-Octopress.git )

The theme should have handled this better, but seems you have to set sidebarRecentLimit in site params, e.g. config.toml:

[params]
sidebarRecentLimit = 5

… or whatever value

1 Like

Problem solved . We had to move , and rename the file sample-config.toml from \ themes \ Hugo-Octopress to site folder \ example.com

Next time please create an issue on Github or just message me here or another way so I can help you.

Bep is right that the theme should handle it better. I should check if the variable exists in the config before trying to access it. I will create an issue on Github about sidebarMenuEnabled and sidebarRecentLimit not being set in the config file.

1 Like