Cannot figure out cloudtag #28
-
I'm playing around with vanilla version of chulapa (changed the skin etc. but nothing major), but the /tags page has issues for me. Seems there is never a tag.name assigned. If I add a print statement to the tag in cloudtag.html like this:
{% assign grouptag = alldocs | map: 'tags' | join: ',' | split: ',' | group_by: tag | sort: 'size' | reverse %}
{%- for tag in grouptag -%}
{{ tag }}
{%- if forloop.first -%}
{%- assign sizemax = tag.size -%}
{%- elsif forloop.last -%}
{% assign mid = tag.size | plus: sizemax | divided_by: 2 %}
{%- endif -%}
{%- endfor -%}
I get the following:
{"name"=>"", "items"=>["starter", "syntax", "kramdown", "starter", "syntax", "markdown", "skin", "bootstrap", "current-theme", "header-hero", "image", "demo", "landscape", "trips", "downtown", "project-links", "wikipedia", "image", "example", "demo", "layout", "guest-author", "image", "landscape", "trips", "downtown", "edinburgh", "kramdown", "bootstrap", "wikipedia", "demo", "image", "urban art", "street", "downtown", "image", "random", "manuscript", "markdown", "exciting-stuff", "wikipedia", "manuscript", "random", "diary", "school", "manuscript", "random", "exciting-stuff", "wikipedia", "pirates", "random", "wikipedia", "random", "exciting-stuff"], "size"=>54}
The rest of the page shows tags.size correctly, but nothing else obviously since tag.name is empty. Seems something goes wrong in the grouptag assignment but I cannot figure it out. Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Hi @cargocultprogramming thanks for reporting. Is there a way to have a look to the repo in which you are using chulapa? |
Beta Was this translation helpful? Give feedback.
-
It's quite a mess since I'm basically just playing around, but I've pushed it here (sans images): https://github.com/cargocultprogramming/friendly-octo |
Beta Was this translation helpful? Give feedback.
-
Hi:
At this moment I am not sure of the root cause of the error and how to solve it (I already spend a couple of hours on it), sorry. EDIT Ok, I checked and it may be an issue associated with Jekyll >= 4.0, in Jekyll >= 3.0 ~ < 4.0 the template works fine. |
Beta Was this translation helpful? Give feedback.
-
And here we have it |
Beta Was this translation helpful? Give feedback.
-
@dieghernan appreciate the time you spent looking into this! Definitely the right approach for solving. The linked discussion contains the right pointers, though I first need to wrap my head around how to exactly implement this as filter. |
Beta Was this translation helpful? Give feedback.
-
For anyone stumbling over this - I posted a workaround in issue #29. |
Beta Was this translation helpful? Give feedback.
For anyone stumbling over this - I posted a workaround in issue #29.