Hugo Drafts

One thing that turn a bit of a show stop is the hugo server, there were some changes made in hugo that breaks my template, I guess. Let’s see it again:

~/B/blog (master)> hugo server -D
Start building sites … 
hugo v0.89.0+extended darwin/amd64 BuildDate=unknown
rst2html / rst2html.py not found in $PATH: Please install.
                  Leaving reStructuredText content unrendered.
Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:5:5: executing "main" at <partial "single/post-info.html" .>: error calling partial: "Blog/blog/layouts/partials/single/post-info.html:21:30": execute of template failed: template: partials/single/post-info.html:21:30: executing "partials/single/post-info.html" at <.>: range can't iterate over General
Built in 622 ms

For some reason, the range command does not iterator anymore over categories, but why? I’ve modified the original template to include a category field to make the post a bit more friendly to find some other posts.

    {{ $taxonomy := "categories" }}
    {{- if $taxonomy}}
         <span> posted in 
    {{ with .Param $taxonomy }}
        {{ range $index, $category := . }}
          {{ with $.Site.GetPage (printf "/%s/%s" $taxonomy $category) -}}
              <a href="{{ .Permalink }}">{{ $category | urlize }}</a>
          {{- end -}}
        {{- end -}}
    {{ end }}

So, something goes wrong when something is happening in the drafts? Maybe a recent change I’ve made to a file? Let’s check them, maybe some categories are malformed in a post that is still in draft?

Hm… I have many posts that are … in a less optional state…

So, let’s see how many posts are there? What!? 280 Posts? Gosh….that’s a lot… Next is to see how many of them are drafts. 62 are with the newer format and 5 are with the older one.

Okay, my working theories is the following: I’ve an incomplete post that has an out-dated header OR incomplete one. Here’s the challenge: I have to go through 280 pages and check it has the correct header formatting or not. hm… crap… That shouldn’t be it. But I guess I’ll post about this some when more…need to debug…

So far, akendo