No fallar con valores vacíos

This commit is contained in:
f 2020-08-29 18:41:57 -03:00
parent 7ba13a699c
commit 92884e2b48
2 changed files with 5 additions and 5 deletions

View file

@ -1,9 +1,9 @@
{% capture url %}{{ site.url }}{{ include.url }}{% endcapture %} {% capture url %}{{ site.url }}{{ include.url }}{% endcapture %}
{% unless include.share.url == '%url' %} {% unless include.share.url == '%url' %}
{% assign url = url | cgi_escape %} {% assign url = url | default: '' | cgi_escape %}
{% endunless %} {% endunless %}
{% assign title = include.title | cgi_escape %} {% assign title = include.title | default: '' | cgi_escape %}
{% assign description = include.description | default: '' | cgi_escape %} {% assign description = include.description | default: '' | cgi_escape %}
<a <a

View file

@ -4,10 +4,10 @@ layout: default
<article class="h-entry" itemscope itemtype="http://schema.org/Article"> <article class="h-entry" itemscope itemtype="http://schema.org/Article">
<header> <header>
<h1 class="p-name" itemprop="name headline">{{ page.title | escape }}</h1> <h1 class="p-name" itemprop="name headline">{{ page.title | default: '' | escape }}</h1>
{%- if page.description -%} {%- if page.description -%}
<p class="lead p-summary" itemprop="description">{{ page.description | escape }}</p> <p class="lead p-summary" itemprop="description">{{ page.description | default: '' | escape }}</p>
{%- endif -%} {%- endif -%}
{%- if page.image.path -%} {%- if page.image.path -%}
@ -29,7 +29,7 @@ layout: default
<span itemprop="author" itemscope itemtype="http://schema.org/Person"> <span itemprop="author" itemscope itemtype="http://schema.org/Person">
<span class="p-author h-card" itemprop="name"> <span class="p-author h-card" itemprop="name">
{{ author | escape }} {{ author | default: '' | escape }}
</span> </span>
</span> </span>
{%- endfor -%} {%- endfor -%}