On netlify (ubuntu 14.04 build image), the jekyll-reading-time string filter outputs an entire post instead of "5 minutes." No issue on my local deploy

The issue:
On my netlify deploy, the jekyll-reading time plugin filter doesn’t act as expected. When I use the string filter on netlify, an entire post is outputted. On my local build the plugin acts as expected (see below).

Example of issue
_home.html liquid
<p><i>Read time: {{ post.content | reading_time | pluralize: "minute" }}</i></p>
Produces this on Netlify:
<p><i>Read time: <p>Data for the construction date of...[truncated]</i></p>
Instead of this, from my local deploy:
<p><i>Read time: 5 minutes</i></p>

Any ideas on how to solve this? I don’t notice anything strange in the build log (linked below).

Just some info, the plugin is located in the _plugins folder as a .rb, and is not referenced in the _config.yml or Gemfile.

Also, I’m using the ubuntu 14.04 build image on netlify. This is because I was getting failed builds due to something related to jekyll-picture-tag. The recommended solution from others was to switch to 14.04, which worked for me. At the bottom of the post is the error message I was receiving, in case it’s useful.

Plugin info

Site info
Site name: northernlightsman.netlify.app
Domains: kat.northernlightsman.com, northernlightsman.com

Build settings:
Repository: Deploy from private github repository
Base directory: not set
Build command: jekyll build
Publish directory: _site/

Build image: Ubuntu Trusty 14.04

Build log

Error message from older builds related to picture-tag
8:36:05 PM: Liquid Exception: convert /tmp/mini_magick20201221-2044-1ilysjz.jpg[0] /tmp/mini_magick20201221-2044-im5xo.webp failed with error: convert: delegate failed "cwebp" -quiet -q %Q "%i" -o "%o"' @ error/delegate.c/InvokeDelegate/1310. in /opt/build/repo/_posts/2020-12-01-acrobatic-quadcopter-build-log.md

hi there,

did you see this already? there are important differences between our build images, and i am wondering whether the behaviour you are seeing is due to this.

Hi Perry,

Thanks for the reply. No, I hadn’t seen that support guide. Much appreciated. The reason I’m using 14.04 is because the Xenial image does not have webp support for imagemagick.

However, I’ve resolved the issue. It seems the plugins located in /_plugins were not being pushed to my repository. There was a .git folder with the contents of a plugin repository in /_plugins. After removing the .git folder, GitHub Desktop recognized the content of /_plugins. The deploy now works as expected.

As an aside, I’m planning to re-work my layout to not use jekyll-picture-tag so that I have more control over responsive images on my site. I’ll move to Xenial at that time.

1 Like

great, glad you found a workaround!