Expected a top-level item to end with a new line, comment or EOF, but got '-' instead.
Hugo Static Site Generator v0.14 BuildDate: 2015-05-26T01:29:16Z
open("/var/www/html/dirtysj/archetypes/default.md", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0777, st_size=105, ...}) = 0
read(3, "+++\ntitle = \"{{ replace .Transla"..., 617) = 105
read(3, "", 512) = 0
close(3) = 0
write(1, "ERROR: 2018/07/03 Near line 2 (l"..., 139ERROR: 2018/07/03 Near line 2 (last key parsed ''): Expected a top-level item to end with a new line, comment or EOF, but got '-' instead.
) = 139
title = "{{ replace .TranslationBaseName "-" " " | title }}"
date = {{ .Date }}
draft = true
+++
v0.14 might be a bit outdated. Can you upgrade to the latest release (v0.42.2)?
I am also not sure if template functions work inside Front Matter.
Your suggestion worked!
I was following this tutorial from DigitalOcean
The line in question was wget https://github.com/spf13/hugo/releases/download/v0.14/hugo_0.14_amd64.deb
I had to uninstall and reinstall Hugo by doing the following
sudo apt-get remove hugo
sudo apt-get remove --auto-remove hugo
sudo apt-get purge hugo
sudo apt-get purge --auto-remove hugo
sudo wget https://github.com/gohugoio/hugo/releases/download/v0.42.2/hugo_0.42.2_Linux-64bit.deb
sudo dpkg -i hugo_0.42.2_Linux-64bit.deb
Glad I could help!
Most helpful comment
Your suggestion worked!
I was following this tutorial from DigitalOcean
The line in question was
wget https://github.com/spf13/hugo/releases/download/v0.14/hugo_0.14_amd64.debI had to uninstall and reinstall Hugo by doing the following
Uninstall
sudo apt-get remove hugosudo apt-get remove --auto-remove hugosudo apt-get purge hugosudo apt-get purge --auto-remove hugoReinstall Latest Version
sudo wget https://github.com/gohugoio/hugo/releases/download/v0.42.2/hugo_0.42.2_Linux-64bit.debsudo dpkg -i hugo_0.42.2_Linux-64bit.deb