Add if else around content and summary

This commit is contained in:
Joakim Hellsén 2023-01-22 23:34:07 +01:00
commit 160cfdc401
No known key found for this signature in database
GPG key ID: C889E6DC5EDBB36D
2 changed files with 8 additions and 10 deletions

View file

@ -114,6 +114,7 @@
{% endraw %} {% endraw %}
</code>{{entry.author}} </code>{{entry.author}}
</li> </li>
{% if entry.content %}
<li> <li>
<code> <code>
{% raw %} {% raw %}
@ -128,6 +129,7 @@
{% endraw %} {% endraw %}
</code>{{entry.content[0].value}} </code>{{entry.content[0].value}}
</li> </li>
{% endif %}
<li> <li>
<code> <code>
{% raw %} {% raw %}
@ -170,6 +172,7 @@
{% endraw %} {% endraw %}
</code>{{entry.read_modified}} </code>{{entry.read_modified}}
</li> </li>
{% if entry.summary %}
<li> <li>
<code> <code>
{% raw %} {% raw %}
@ -184,6 +187,7 @@
{% endraw %} {% endraw %}
</code>{{entry.summary}} </code>{{entry.summary}}
</li> </li>
{% endif %}
<li> <li>
<code> <code>
{% raw %} {% raw %}
@ -216,16 +220,6 @@
{% endraw %} {% endraw %}
</code> </code>
</li> </li>
<br/>
<li>Will become:</li>
<li>
<code>
<pre>
{{feed.title -}}
{{- entry.content[0].value|discord_markdown -}}
</pre>
</code>
</li>
</ul> </ul>
{% else %} {% else %}
Something went wrong, there was no entry found. If this feed has entries and you still see this message, please contact the developer. Something went wrong, there was no entry found. If this feed has entries and you still see this message, please contact the developer.

View file

@ -110,6 +110,7 @@
{% endraw %} {% endraw %}
</code>{{entry.author}} </code>{{entry.author}}
</li> </li>
{% if entry.content %}
<li> <li>
<code> <code>
{% raw %} {% raw %}
@ -124,6 +125,7 @@
{% endraw %} {% endraw %}
</code>{{entry.content[0].value}} </code>{{entry.content[0].value}}
</li> </li>
{% endif %}
<li> <li>
<code> <code>
{% raw %} {% raw %}
@ -166,6 +168,7 @@
{% endraw %} {% endraw %}
</code>{{entry.read_modified}} </code>{{entry.read_modified}}
</li> </li>
{% if entry.summary %}
<li> <li>
<code> <code>
{% raw %} {% raw %}
@ -180,6 +183,7 @@
{% endraw %} {% endraw %}
</code>{{entry.summary}} </code>{{entry.summary}}
</li> </li>
{% endif %}
<li> <li>
<code> <code>
{% raw %} {% raw %}