lukeorth / poison

Professional Hugo theme for dev bloggers. Based on Mdo's classic Hyde theme.
https://poison.lukeorth.com
GNU General Public License v3.0
172 stars 94 forks source link

Safeguard meta.html fileExists for error-free build on Windows #181

Open dbdness opened 2 months ago

dbdness commented 2 months ago

closes #166.

Thanks for an amazing theme! This PR introduces a simple nil check with {{ with $image_path }} in meta.html before the call to fileExists $image_path_local.

This change fixes the build issues on Windows machines as described in #166 and #148, as the build will no longer reach a fileExists call with a "\assets\%!s(<nil>)" argument, which is not a supported file path on Windows due to the percent sign.