Can someone help me tackle this error on my personal site?

Hello! First off I want to say that I am LOVING Hugo. I’ve never used a static site generator before and I mostly come from an IT background (Although I know my way around a text editor).

Anyways, I’m getting an error code that looks like this:

ERROR 2018/03/28 21:53:34 Failed to add template “theme/partials/portfolio/skills.html” in path “/home/jdbohrman/Dropbox/jdbohrman.github.io (Resume)/themes/resume/layouts/partials/portfolio/skills.html”: template: theme/partials/portfolio/skills.html:10: function “cond” not defined
ERROR 2018/03/28 21:53:34 theme/partials/portfolio/skills.html : template: theme/partials/portfolio/skills.html:10: function “cond” not defined
Started building sites …
ERROR 2018/03/28 21:53:34 Error while rendering “section”: template: /home/jdbohrman/Dropbox/jdbohrman.github.io (Resume)/themes/resume/layouts/_default/section.html:8:11: executing “main” at <partial (printf "%s%…>: error calling partial: Partial “Summary” not found
ERROR 2018/03/28 21:53:34 Error while rendering “home”: template: /home/jdbohrman/Dropbox/jdbohrman.github.io (Resume)/themes/resume/layouts/index.html:4:10: executing “main” at <partial "portfolio/s…>: error calling partial: template: “theme/partials/portfolio/skills.html” is an incomplete or empty template

I’m assuming it has something to do with my skills.json file since it says the skills.html is having trouble rendering.

Here’s what that looks like:

I am using the Resume template by Eddie Web and for the most part understand what’s going on, but can’t figure out what I’m missing.

Post your skills.html - that one is having problems, not the json file.

Hey, I don’t know why I didn’t do this first but here’s the git repo. https://github.com/jdbohrman/jdbohrman.xyz

Here’s a screenshot regardless,

Also, the path of the skill.html file I’m posting is ..themes/resume/layouts/partials/portfolio. Was I supposed to copy the contents of layouts into the root folder?

you can copy paste code and add three ticks before and after like this:

```
code
```

this way we can see the full code. there is some cut on the right side.

the error states “cond is not defined” in line 10 - which is cut on the right side. it might just be a missing bracket on the right side or brackets inside the code.

Oof. I feel so stupid haha. I was wondering this entire time if Markdown worked here and didn’t realize it said it right before you began typing. My bad.

<section class="resume-section p-3 p-lg-5 d-flex flex-column" id="skills">
  <div class="my-auto" id="skills-content">
    <h2 class="mb-5">Skills</h2>
    {{ range $.Site.Data.skills }}
        <div class="subheading mb-3 skills-heading">{{ .grouping }}</div>
            <ul>
            {{ range .skills }}
                {{ if isset . "name" }}
                    <li class="list-inline-item">
                      <i class="devicons devicons-{{ cond (in $.Site.Data.devicons (lower .name)) (lower .name) "terminal_badge" }}"></i>
                      <a href="{{.link}}">{{ .name }}</a>
                    </li>
                {{ else }}
                  <li class="list-inline-item">
                    <i class="devicons devicons-{{ cond (in $.Site.Data.devicons (lower .)) (lower .) "terminal_badge" }}"></i>
                    {{ . }}
                  </li>
                {{ end }}
            {{ end }}
            </ul>
    {{ end }}
  </div>
</section>

If I am not mistaken what you do there it probably is better if you try a if/else construct like this:

<i class="devicons devicons-{{ if $.Site.Data.devicons (lower .name)) }}{{ lower .name }}{{ else }}terminal_badge{{ end }}"></i>

ANDDDDDDD we have a new error. :joy::joy::joy:

ERROR 2018/03/28 23:11:22 Failed to add template “theme/partials/portfolio/skills.html” in path “/home/jdbohrman/Dropbox/jdbohrman.github.io (Resume)/themes/resume/layouts/partials/portfolio/skills.html”: template: theme/partials/portfolio/skills.html:10: unexpected “)” in input
ERROR 2018/03/28 23:11:22 theme/partials/portfolio/skills.html : template: theme/partials/portfolio/skills.html:10: unexpected “)” in input
Started building sites …
ERROR 2018/03/28 23:11:22 Error while rendering “section”: template: /home/jdbohrman/Dropbox/jdbohrman.github.io (Resume)/themes/resume/layouts/_default/section.html:8:11: executing “main” at <partial (printf "%s%…>: error calling partial: Partial “Summary” not found
ERROR 2018/03/28 23:11:22 Error while rendering “home”: template: /home/jdbohrman/Dropbox/jdbohrman.github.io (Resume)/themes/resume/layouts/index.html:4:10: executing “main” at <partial "portfolio/s…>: error calling partial: template: “theme/partials/portfolio/skills.html” is an incomplete or empty template

my fault:

<i class="devicons devicons-{{ if $.Site.Data.devicons (lower .name) }}{{ lower .name }}{{ else }}terminal_badge{{ end }}"></i>

This is the last one. Thanks for your help by the way.

ERROR 2018/03/28 23:18:39 Error while rendering “section”: template: /home/jdbohrman/Dropbox/jdbohrman.github.io (Resume)/themes/resume/layouts/_default/section.html:8:11: executing “main” at <partial (printf "%s%…>: error calling partial: Partial “Summary” not found

{{ define "main" }}
{{ partial "breadcrumbs" . }}
<section class="resume-section p-3 p-lg-5 d-flex flex-column">
  <div class="my-auto" id="projects-content">
    <h1 id="{{ urlize .Title }}">{{ .Title }}</h1>
    <p>{{ .Content }}</p>
    {{ range .Data.Pages.ByWeight }}
        {{ partial (printf "%s%s" .Section "Summary") . }}
    {{ end }}
    {{ range .Sections }}
      <h2 id="{{ urlize .Title }}"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
      <p>{{ .Content }}</p>
      {{ range .Pages }}
        {{ partial (printf "%s%s" .Section "Summary") . }}
      {{ end }}
    {{ end }}
  </div>
</section>
{{ end }}

It’s probably more a case of IsSet, see here:

Apart from that the error now points to /themes/resume/layouts/_default/section.html and you reference there a Summary partial, but have projectsSummary.html, publicationsSummary.html and so on.

This has me all types of confused right now. I cloned this from a repo so shouldn’t this already be working and sorted out? I’m fairly new to Hugo so some of the rendering aspects are foreign to me. I figured this theme would have been already organized in a way that it could be built.

It all boils down to your content. If the partial is loaded for content that has no section then the partial renders to Summary.html.

Copy one of the three summary partials and name it Summary.html and it will probably work. But detailled help is only possible if you put your repository public somewhere so one of the more able people here can have a look into it.

My next attempt would probably be to add a line like section: projects to the pages so I can see if it somehow renders.

Did you go through the setup instructions of the theme? remove your content and add the sample content from the repo and see how it parses. And if that still does not render you could also open a ticket on the github repo itself to see if the author has an answer…

So good news is, the error is gone and there’s no more errors. Bad news is that none of my content is rendering.

Here’s what the site looks like. Screenshot%20from%202018-03-29%2000-52-27

Here’s my config.toml:

baseURL = "https://jdbohrman.xyz/"
languageCode = "en-us"
title = "James Bohrman"
theme = "resume"

[params]
    firstName = "James"
    lastName = "Bohrman"
    address = "Knoxville, TN"
    phone = "1-865-776-3192"
    contactNote = "Cyber Ninja"
    profileImage = "img/profile3.jpg"
    email = "jdbohrman@protonmail.com"
    description = "Passionate Systems Administrator that knows his way around a test editor. Experienced with tools such as AWS, Docker, Linux, and Chef as well as programming languages such as Javascript, Python, and Bash"
    favicon = "images/favicon.ico"
    # what sections
    showSkills = true
    showProjects = false
    showOpenSource = false
    showPublications = false
    showExperience = true
    showEducation = true

    showQr = true

[[params.handles]]
    name = "LinkedIn"
    link = "https://www.linkedin.com/in/jdbohrman/"


[[params.handles]]
    name = "GitHub"
    link = "https://github.com/jdbohrman/"

[[params.handles]]
    name = "Bitbucket"
    link = "https://bitbucket.org/jdbohrman/"

[[params.handles]]
    name = "Stack Overflow"
    link = "https://stackoverflow.com/users/story/82880"
    icon = "stack-overflow"

[[params.handles]]
    name = "Keybase"
    link = "https://keybase.io/jdbohrman"
    icon = "key"

[params.google.analytics]
    trackerID = "XX-123446-01"

i was facing the same issue with this, using hugo v0.49, while the site was able to build fine on my machine but failed on with the same error on https://netlify.com , (probably they are building this with other version of hugo ) which don’t support condo ( dont know for sure )

created a netlify.toml file in the git repo with the version of hugo to build this , and it worked for me