gethugothemes / academia-hugo

Academia is a Hugo resume theme. You can showcase your academic resume, publications and talks using this theme.

Home Page:https://gethugothemes.com/products/academia/?utm_source=academia_github&utm_medium=referral&utm_campaign=github_theme_about

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error building example site

PhilPalmer opened this issue · comments

Hi,

Thanks for building what looks like a great theme.

I'm having some issues building the example site. For example, I've tried running the following:

mkdir blog && cd blog
git init
git submodule add https://github.com/themefisher/Academia-hugo.git themes/academia-hugo
cp -arv themes/academia-hugo/exampleSite/* .
hugo server

However, I am getting this error:

Building sites … ERROR 2020/05/25 21:08:57 render of "page" failed: "/Users/phil/Documents/GitHub/blog/themes/academia-hugo/layouts/publication/single.html:14:10": execute of template failed: template: publication/single.html:14:10: executing "main" at <(.Params.publication_types) and (ne (index .Params.publication_types 0) "0")>: can't give argument to non-function .Params.publication_types
ERROR 2020/05/25 21:08:57 render of "page" failed: "/Users/phil/Documents/GitHub/blog/themes/academia-hugo/layouts/publication/single.html:14:10": execute of template failed: template: publication/single.html:14:10: executing "main" at <(.Params.publication_types) and (ne (index .Params.publication_types 0) "0")>: can't give argument to non-function .Params.publication_types
Built in 496 ms
Error: Error building site: failed to render pages: render of "page" failed: "/Users/phil/Documents/GitHub/blog/themes/academia-hugo/layouts/publication/single.html:14:10": execute of template failed: template: publication/single.html:14:10: executing "main" at <(.Params.publication_types) and (ne (index .Params.publication_types 0) "0")>: can't give argument to non-function .Params.publication_types

EDIT: It seems to work for me after deleting the following in layouts/publication/single.html on this line was causing the issue:

(ne (index .Params.publication_types 0) "0")

Also, I'm using Hugo v0.71.1. I'm new to using hugo so am not sure why it was causing an issue. Any ideas why this was causing an issue?

Thanks in advance,
Phil

hey there, thanks for your concern, I have fixed this issue. please download the latest code

Thanks for the theme. This problem is not solved though, there is no clear way to install this theme.

@Oluwatimi I just ran the commands above and it now works for me:

mkdir blog && cd blog
git init
git submodule add https://github.com/themefisher/Academia-hugo.git themes/academia-hugo
cp -arv themes/academia-hugo/exampleSite/* .
hugo server

However, I do agree that it is unclear how to install the theme, at least for new users & it took me a while to work out how to run the site. @somrat-gyver could the documentation be updated for this? Do you want me to submit a PR with this example usage?

@PhilPalmer it will be great if you make a PR.