Add content_raw and summary_raw

This commit is contained in:
2023-01-15 06:10:53 +01:00
parent 3bc5d1c24e
commit b12c0840bc
3 changed files with 8 additions and 4 deletions

View File

@ -65,6 +65,7 @@ def replace_tags(feed: Feed, entry: Entry) -> str:
{"{{entry_added}}": entry.added},
{"{{entry_author}}": entry.author},
{"{{entry_content}}": content},
{"{{entry_content_raw}}": entry.content[0]["value"]},
{"{{entry_id}}": entry.id},
{"{{entry_important}}": str(entry.important)},
{"{{entry_link}}": entry.link},
@ -72,6 +73,7 @@ def replace_tags(feed: Feed, entry: Entry) -> str:
{"{{entry_read}}": str(entry.read)},
{"{{entry_read_modified}}": entry.read_modified},
{"{{entry_summary}}": summary},
{"{{entry_summary_raw}}": entry.summary},
{"{{entry_title}}": entry.title},
{"{{entry_updated}}": entry.updated},
]

View File

@ -28,14 +28,16 @@
<br>
<li><code>{% raw %}{{entry_added}}{% endraw %}</code> - {{entry.added}}</li>
<li><code>{% raw %}{{entry_author}}{% endraw %}</code> - {{entry.author}}</li>
<li><code>{% raw %}{{entry_content}}{% endraw %}</code> - {{entry.content[0].value}}</li>
<li><code>{% raw %}{{entry_content}}{% endraw %}</code> - {{entry.content[0].value|discord_markdown}}</li>
<li><code>{% raw %}{{entry_content_raw}}{% endraw %}</code> - {{entry.content[0].value}}</li>
<li><code>{% raw %}{{entry_id}}{% endraw %}</code> - {{entry.id}}</li>
<li><code>{% raw %}{{entry_important}}{% endraw %}</code> - {{entry.important}}</li>
<li><code>{% raw %}{{entry_link}}{% endraw %}</code> - {{entry.link}}</li>
<li><code>{% raw %}{{entry_published}}{% endraw %}</code> - {{entry.published}}</li>
<li><code>{% raw %}{{entry_read}}{% endraw %}</code> - {{entry.read}}</li>
<li><code>{% raw %}{{entry_read_modified}}{% endraw %}</code> - {{entry.read_modified}}</li>
<li><code>{% raw %}{{entry_summary}}{% endraw %}</code> - {{entry.summary}}</li>
<li><code>{% raw %}{{entry_summary}}{% endraw %}</code> - {{entry.summary|discord_markdown}}</li>
<li><code>{% raw %}{{entry_summary_raw}}{% endraw %}</code> - {{entry.summary}}</li>
<li><code>{% raw %}{{entry_title}}{% endraw %}</code> - {{entry.title}}</li>
<li><code>{% raw %}{{entry_updated}}{% endraw %}</code> - {{entry.updated}}</li>
</ul>

View File

@ -52,11 +52,11 @@
{% if entry.summary%}
<div class="text-muted">
{{ entry.summary | discord_markdown }}
{{ entry.summary|discord_markdown }}
</div>
{% elif entry.content[0].value %}
<div class="text-muted">
{{ entry.content[0].value | discord_markdown }}
{{ entry.content[0].value|discord_markdown }}
</div>
{% else %}
<div class="text-muted">