welcomments / website

The official website for Welcomments - pre-rendered static HTML comments for Jekyll, Hugo, and Eleventy.
https://welcomments.io
0 stars 0 forks source link

Some suggestions #2

Open dieghernan opened 1 year ago

dieghernan commented 1 year ago

Hi @roughike

As you already know, I implemented welcomments on https://dieghernan.github.io/chulapa/docs/02-config#xx-other-settings

I share here with you some thoughs:

On the bot

On the templates

        <h3 class="welcomments__author-name" itemprop="author" itemscope itemtype="https://schema.org/Person">
        {% if author_website %}
          <span itemprop="name"><a href ="{{ author_website }}"> {{ author_name }}</a></span>
        {% else %}
       <span itemprop="name">{{ author_name }}</span>
        {% endif %}
        </h3>

A new css rule would be needed, something like

.welcomments__container .welcomments__author-name a:hover {
    text-decoration: underline;
    background: none;
}

On the css

I noticed that the custom css https://cdn.welcomments.io/welcomments.css interacts badly with Fontawesome, basically due to this kind of rules:


.welcomments__container * {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
    line-height: 1.5;
}
.welcomments__container * {
    font-family: inherit;
    line-height: inherit;
}
...

In my case I needed to ship a modified version of the welcomments removing the font-family rules.

Misc

On avatar image, welcomments seems to be ready to use custom images but it is not integrated (at least not in the customr form). My understanding is that providing a form for inputting an url to an avatar is easy. Would it be something that you may consider to expand?

Regards and thanks for this coooool plugin

dieghernan commented 1 year ago

More on images:

If an user provides the email the app can try to get the avatar from Gravatar, using https://ui-avatars.com/ as fallback, see in the ui-avatar docs:

https://www.gravatar.com/avatar/EMAIL_MD5?s=64&d=https%3A%2F%2Fui-avatars.com%2Fapi%2F/Lasse+Rafn/64

On an existing user:


https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?s=64&d=https%3A%2F%2Fui-avatars.com%2Fapi%2F/Lasse+Rafn/64

The MD5 hash of the email can be derived as explained https://es.gravatar.com/site/implement/hash/

My concern here is privacy, since MD5 is not fully secured (can be broken by brute force to get back the email). I would favored that or, at least, give the user the option to opt out

dieghernan commented 1 year ago

Oh, I see on https://welcomments.io/blog/november-2021-update

I did consider Gravatar, but I’m not sure if it’s a good idea in 2022 to expose the md5 hashes of users’ email addresses to everyone visiting a given site.

I will have to look at the “proper” way to add avatars, maybe it’s Gravatar, maybe it’s something else.