The article.html template, when the sharing button is enabled, uses the description of the page to generate the share link. However the end user may not want descriptions. If a page description is empty, the following error is thrown: ``` Error: Failed to build the site Error: Failed to render page '/home...index.md' Error: Reason: Failed to render 'article.html' Error: Reason: Filter call 'urlencode' failed Error: Reason: Filter `urlencode` was called on an incorrect value: got `null` but expected a String ``` We now check if the description is not empty before passing it to urlencode, and don't use it if it is not set
6.2 KiB
6.2 KiB