HUGO

Hugo does not parse <li> HTML Tags

Hi there,

atm im working me through the Tutorial, specifically this part: Data Templates | Hugo
So i created two files: data/jazz/bass/jacopastorius.yaml and data/jazz/bass/johnpatitucci.yaml - both with some basic content as given on the site.
then i created an testing.md in the archetypes folder with this content:

{{ range $.Site.Data.jazz.bass }}
   {{ partial "artist.html" . }}
{{ end }}

Then i created an artist.html in the layouts/partials folder with this content

<ul>
{{ range .discography }}
  <li>{{ . }}</li>
{{ end }}
</ul>

When i am now creating a hugo website with hugo -D and pushing the public folder to my apache-webserver, the Site looks like this:


Why does hugo not parse the li-HTML tags?

…solved it by myself. I had some whitespaces too much in my artist.html

An correct artist.html haves to be like this:

<ul>
{{ range .discography }}
<li> {{ . }} </li>
{{ end }}
</ul>
    

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