Problematic meta in included posts and pages
Using the tranquilpeak theme with blogdown in RStudio resulted in errors when building the site in Hugo:
bash$ hugo server
Building sites … ERROR 2018/05/08 13:18:37 Error while rendering “page” in “post/”: template: theme/_default/single.html:16:15: executing “theme/_default/single.html” at <partial "post/header…>: error calling partial: template: theme/partials/post/header.html:13:5: executing “theme/partials/post/header.html” at <partial "post/meta.h…>: error calling partial: template: theme/partials/post/meta.html:8:7: executing “theme/partials/post/meta.html” at <partial "post/catego…>: error calling partial: template: theme/partials/post/category.html:5:23: executing “theme/partials/post/category.html” at <.>: range can’t iterate over R
ERROR 2018/05/08 13:18:37 Error while rendering “taxonomyTerm” in “”: template: theme/taxonomy/category.terms.html:6:25: executing “theme/taxonomy/category.terms.html” at <apply .Params.catego…>: error calling apply: can’t apply over R
ERROR 2018/05/08 13:18:37 in .Render: Failed to execute template “theme/_default/summary.html”: template: theme/_default/summary.html:40:9: executing “theme/_default/summary.html” at <partial “post/meta” …>: error calling partial: template: theme/partials/post/meta.html:8:7: executing “theme/partials/post/meta.html” at <partial "post/catego…>: error calling partial: template: theme/partials/post/category.html:5:23: executing “theme/partials/post/category.html” at <.>: range can’t iterate over R
The problem was wrongly-written meta information in a couple of older posts and the Category page that were included in the theme.
The original meta caused the problem, written in this style:
categories:
- category
- subcategory
tags:
- tag1
- tag2
keywords:
It worked when rewritten as:
---
title: "Hello R Markdown"
author: "Frida Gomam"
date: '2015-07-23T21:13:14-05:00'
tags: ["R Markdown", "plot", "regression"]
categories: ["R"]
---
Now the site builds properly:
bash$ hugo server
| EN-US
+------------------+-------+ Pages | 82 Paginator pages | 4 Non-page files | 0 Static files | 7 Processed images | 0 Aliases | 31 Sitemaps | 1 Cleaned | 0
Total in 620 ms Watching for changes in /Users/Stuart/Data/Active/Technology/R/RProjects/diatranq/{content,data,layouts,static,themes} Watching for config changes in /Users/Stuart/Data/Active/Technology/R/RProjects/diatranq/config.toml Serving pages from memory Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender Web Server is available at //localhost:1313/ (bind address 127.0.0.1) Press Ctrl+C to stop
Configuration
- Operating system with its version: OS X 10.11.6
- Browser with its version: RStudio 1.1.442
- Hugo version: v0.40.2 darwin/amd64
- Tranquilpeak version: 0.4.3-BETA
- Do you reproduce on https://tranquilpeak.kakawait.com demo?: Can't find that post on it.
See original post on https://discourse.gohugo.io/t/solved-tranquilpeak-theme-not-building-index-html/11885/3
Thank you for detailed issue, I will check asap