Sudden Errors: "truncate" function not defined

10:34:54 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';

10:34:54 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";

10:34:54 PM: go version >&2;

10:34:54 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';

10:34:54 PM: go version go1.12 linux/amd64

10:34:54 PM: Installing missing commands

10:34:54 PM: Verify run directory

10:34:54 PM: Executing user command: hugo

10:34:55 PM: Started building sites ...

10:34:55 PM: ERROR: 2019/08/27 02:34:55 template.go:477: template: /opt/build/repo/themes/mindtrades-theme/layouts/_default/baseof.html:22: function "truncate" not defined

10:34:55 PM: ERROR: 2019/08/27 02:34:55 template.go:477: template: /opt/build/repo/themes/mindtrades-theme/layouts/_default/baseof.html:46: function "truncate" not defined

10:34:55 PM: ERROR: 2019/08/27 02:34:55 page.go:497: frontmatter delimiter must be followed by CR+LF or LF but those can't be found at filepos 165

10:34:55 PM: Error: Error building site: Errors reading pages: Error:frontmatter delimiter must be followed by CR+LF or LF but those can't be found at filepos 165 for big_data2.md

These errors were not present at 3pm Aug 26th, but appeared at 9pm of the same day after trying to add a new markdown files. I removed the markdown files to see if it was something with that, but no change.

Updated my Hugo to 0.57.2, rebuilt using the hugo command, and still nothing. I changed .Pages to .RegularPages where needed. There are no errors when I run it locally, only when I try to deploy netlify.

example of truncate use: {{ .Content | safeHTML | truncate 200 }}

I think that not the truncate errors are the ones you have to fix but the frontmatter ones:

10:34:55 PM: ERROR: 2019/08/27 02:34:55 page.go:497: frontmatter delimiter must be followed by CR+LF or LF but those can’t be found at filepos 165

10:34:55 PM: Error: Error building site: Errors reading pages: Error:frontmatter delimiter must be followed by CR+LF or LF but those can’t be found at filepos 165 for big_data2.md

big_data2.md has frontmatter that is not ended with line breaks. Have a look at that. After that there is probably something there to truncate and the errors about truncation will disappear.

(By the way, if you want to post code you can wrap it in backticks (`), one for inline code, three for blocks of code)

thanks a bunch, there were spaces beside the — that I just couldn’t see at all