Replace code with image

The Twig code was breaking Liquid in ConvertKit.
This commit is contained in:
Oliver Davies 2024-01-10 13:00:00 +00:00
parent b5ff9d786b
commit 5a1b99ea27
2 changed files with 2 additions and 10 deletions

View file

@ -13,17 +13,9 @@ tags:
Here is some code from my website:
```twig
{%- verbatim -%}
{% set talkCount = 0 %}
![A screenshot of the code that calculates the number of talks I've given.]({{site.url}}/assets/images/talk-count-code.png)
{% for talk in data.talks %}
{% for event in talk.events if 'today'|date('U') >= event.date|date('U') %}
{% set talkCount = talkCount + 1 %}
{% endfor %}
{% endfor %}
{%- endverbatim -%}
```
If you want, you can also [view it on GitHub](https://raw.githubusercontent.com/opdavies/oliverdavies.uk/main/source/_pages/talks.md).
It is business logic responsible for counting the number of talks I've given at different events so I can display it on my Talks page.

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB