{"action":"opened","issue":{"url":"https://api.github.com/repos/jbake-org/jbake/issues/468","repository_url":"https://api.github.com/repos/jbake-org/jbake","labels_url":"https://api.github.com/repos/jbake-org/jbake/issues/468/labels{/name}","comments_url":"https://api.github.com/repos/jbake-org/jbake/issues/468/comments","events_url":"https://api.github.com/repos/jbake-org/jbake/issues/468/events","html_url":"https://github.com/jbake-org/jbake/issues/468","id":327609539,"number":468,"title":"alltags contains Strings instead of tag-maps","user":{"login":"38leinaD","id":413413,"avatar_url":"https://avatars3.githubusercontent.com/u/413413?v=4","gravatar_id":"","url":"https://api.github.com/users/38leinaD","html_url":"https://github.com/38leinaD","followers_url":"https://api.github.com/users/38leinaD/followers","following_url":"https://api.github.com/users/38leinaD/following{/other_user}","gists_url":"https://api.github.com/users/38leinaD/gists{/gist_id}","starred_url":"https://api.github.com/users/38leinaD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/38leinaD/subscriptions","organizations_url":"https://api.github.com/users/38leinaD/orgs","repos_url":"https://api.github.com/users/38leinaD/repos","events_url":"https://api.github.com/users/38leinaD/events{/privacy}","received_events_url":"https://api.github.com/users/38leinaD/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-30T07:38:55Z","updated_at":"2018-05-30T07:38:55Z","closed_at":null,"author_association":"NONE","body":"I would like to print a tag-index and using freemaker. The tag-index should print the number of posts per tag. I am doing it like this:\r\n\r\n```\r\n<#include \"header.ftl\">\r\n\r\n\t<#include \"menu.ftl\">\r\n\t\r\n\t<div class=\"page-header\">\r\n\t\t<h1>Tags</h1>\r\n\t</div>\r\n\t\r\n\t<ul>\r\n\t\t<#list alltags as tag>\r\n\t\t\t<li><a href=\"${tag.name}.html\">${tag}</a> (${tag.tagged_posts?size})</li> <!-- THIS IS LINE 11 -->\r\n\t\t</#list>\r\n\t</ul>\r\n\t\r\n<#include \"footer.ftl\">\r\n```\r\n\r\nI get the following error:\r\n\r\n```\r\nFailed to render tagindex\r\n\r\n\tat org.jbake.launcher.Baker.bake(Baker.java:32)\r\n\tat org.jbake.launcher.Main.run(Main.java:97)\r\n\tat org.jbake.launcher.Main.run(Main.java:82)\r\n\tat org.jbake.launcher.Main.main(Main.java:36)\r\nCaused by: org.jbake.template.RenderingException: java.lang.Exception: Failed to render tags. Cause(s):\r\nFailed to render tagindex\r\n\tat org.jbake.render.TagsRenderer.render(TagsRenderer.java:20)\r\n\tat org.jbake.app.Oven.bake(Oven.java:155)\r\n\tat org.jbake.launcher.Baker.bake(Baker.java:20)\r\n\t... 3 more\r\nCaused by: java.lang.Exception: Failed to render tags. Cause(s):\r\nFailed to render tagindex\r\n\tat org.jbake.app.Renderer.renderTags(Renderer.java:386)\r\n\tat org.jbake.render.TagsRenderer.render(TagsRenderer.java:18)\r\n\t... 5 more\r\nCaused by: java.lang.Exception: Failed to render tagindex\r\n\tat org.jbake.app.Renderer.render(Renderer.java:239)\r\n\tat org.jbake.app.Renderer.renderTags(Renderer.java:373)\r\n\t... 6 more\r\nCaused by: org.jbake.template.RenderingException: freemarker.core.NonHashException: For \".\" left-hand operand: Expected a hash, but this has evaluated to a string (wrapper: f.t.SimpleScalar):\r\n==> atag  [in template \"tags-index.ftl\" at line 11, column 40]\r\n```\r\n\r\nI am neither an expert on jbake nore freemaker but based on the jbake documentation that states that \r\n\r\n> alltags = collection of all tags used across all published content\r\n\r\nand that\r\n\r\n> Global variable tags represent a collection of all tags. Each tag in this collection is represented by a map containing following attributes -\r\n\r\nExpected:\r\nI assumed that alltags would also give a map instead of tag-maps.\r\n\r\nActual:\r\nalltags just contains a list of tag-strings\r\n\r\nIs there a workaround? I.e. What is a way to get the posts for a tag? Or more specific the number of posts per tag?\r\n"}}
{"actor":{"display_login":"38leinaD"}}