diff --git a/source/_daily_emails/2024-01-10.md b/source/_daily_emails/2024-01-10.md index 97bf3b1c..ac1fdb8f 100644 --- a/source/_daily_emails/2024-01-10.md +++ b/source/_daily_emails/2024-01-10.md @@ -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. diff --git a/source/assets/images/talk-count-code.png b/source/assets/images/talk-count-code.png new file mode 100644 index 00000000..c6315f81 Binary files /dev/null and b/source/assets/images/talk-count-code.png differ