Skip to content

Jekyll: widget does not show up on my page

I have simple jekyll blog where I would love to add widget.

Here is the code which I use to add the widget:

<script async src=""
    data-comments-app-website="{{ site.comments.commentsapp-id }}"
    data-limit="{{ site.comments.limit }}"
    Comments not available if Javascript is blocked. This is the only function of
    this website which needs Javascript.

the site.comments.commentsapp-id is stored in my _config.yml and it is placed correctly in rendered result.

But the widget does not show on page. What did I do wrong ?

Update: In inspect element option I discovered this:

<iframe id="comments-app-Kh5zcvkB-1" src=";page_url=%page/title%2F&amp;origin=;page_title=y-tittle&amp;limit=5&amp;color=39C4E8&amp;dark=1" scrolling="no" style="overflow: hidden; border: medium none;" width="100%" height="0" frameborder="0">
    <head></head><body>Page url invalid</body>


Finally solved this problem. It was caused by relative canonical URL in head of document.

So I replaced this:

<link rel="canonical" href="{{ page.url }}">

with this:

<link rel="canonical" href="{{ absolute_url }}">

Now it works fine.