Issue with "Caption" in GoLang - I am new to coding

I’m building a website on Hugo. I’m using a theme, but I’m trying to modify the theme slightly to fit my needs.

The issue I’m having is setting up a “caption” for an image.

The website theme is divided in half, where you can put content on one side and the other. In my case, I want to put a picture & text on the left side and text on the right. However, when I do this, the text (that would be customized for the caption) flows to the right-hand side and then the text that would be on the right-hand side flows beneath the picture (seemingingly in another quadrant). I think that I’m missing a or something simple that would otherwise allow the relevant code to ‘continue.’

Here is the relevant code snippet:

{{ with .GetPage “work-2” }}

{{.Params.custom_css | safeCSS}}
{{ with .Params.image }}
about-me
{{ end }}

{{ with .Params.experience }}
{{ if .enable }}

{{ .caption }}
{{ end }} {{ end }}

{{ with .Params.skill }}
{{ if .enable }}

{{ .title }}

{{ .role | markdownify }}

(code continues)

Hi @tc91, welcome to the forum.

Hugo uses standard Go templates but the way the templates are interpreted are specific to Hugo. Hence I guess you will more likely get an answer in the Hugo forum.

@christophberger ahhh, thank you. The other thing that I realized after this post was that my issue was with HTML, not GO. Somehow, the HTML needs to be formatted differently within the Index file.
Anyways, thank you for the resource.

1 Like

You’re welcome! :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.