have filters to get numbers ?
For now the only way I found to get the actual number of mentions to use them for logic is something like this:
{% capture wbmcount %}{% webmention_count page.url %}{% endcapture %}
{% assign wbmcount = wbmcount | remove: '<span class="webmention-count">' | remove: "</span>" | times:1 %}
{% if wbmcount > 0 %}
...
Thats quite tedious - it would be great if you could do something like:
{{ wbmcount = page.url | webmention_count }}
i.e. have filters operating on page.url to return the various values.
Have you tried overriding the default count template like in this example? The count comes in as a liquid variable there, which (I think) should enable you to do whatever you want with it.
that is what I ended up with doing but I still have to go through the "dance" of calling | times:1 on the value as its still considered a string.
Ok. I'm not sure if a tag can return anything anything other than a string, but I'll look into it.
There Liquid docs actually have quite a few numerical examples, but they all return as strings 😣
This might be a good update for the documentation.
I kept having Ruby/Jekyll issues when upgrading my Mac, so I have moved off of Jekyll and will not be working on this project anymore, going forward. I am going to flag this as won’t fix, but leave it open in case someone else wants to pick up the project from here.