Catégories
Technologie

Commentaires auto-hébergés ou commentaires intégrés de WordPress

Since I got my performance in order on this website. I decided to put the comments in order and initially thought that I would go with Disqus, but was quickly discouraged when I saw that they automatically add affiliate links and ads to your site. No thanks! You are able to turn off the affiliate links, but there are other reasons to consider, Enter Commento:

Pour

  • Responsive (ONLY 11 KB of JavaScript and CSS)
  • Privacy-focused
  • Social Logins (Google, Twitter, GitHub & GitLab)
  • Hosted ($5 and up) OR Self-hosted
  • Less load on your sever
  • Docker Support
  • More features vs built-in WordPress Comments
  • Embed comment forms anywhere with tiny HTML script
  • Mobile-responsive
  • Analytique

Cons

  • No WordPress Plug-in
  • Something else to manage (if you choose to self-host)
  • Setup (if you choose to self-host)
  • No Native SSL Support (requires extra work to add-on)

One other really awesome thing about Commento is that you are given the choice to either pay to have it hosted Commento.io or host it yourself!

If you decided to have them host it for you or self-host, either way, you can import comments from Disqus into Commento. So right now, if you're coming from WP comments, you may need to import your WordPress comments into Disqus first and, then export your comments, etc.

Commento + Docker + SSL

I found an awesome repository for getting up and running with self-hosting, Commento. Raul uses Let’s Encrypt for SSL/TLS, along with NGINX.

GitHub: Commento easy-install with Docker Compose and SSL

I had trouble getting NGIX to properly load the SSL certificate files and found I had to change the permission of both files to:

sudo chmod 0640 /etc/letsencrypt/live/commento.mydomain.com/fullchain.pem
sudo chmod 0640 /etc/letsencrypt/live/commento.mydomain.com/privkey.pem

That got me up and running.

Place the code

<script defer src="https://commento.mydomain.com/js/commento.js"></script>
<div id="commento"></div>

Getting It Working With a Child Theme

I duplicated content-single.php into my child theme directory (GeneratePress) and pasted the Commento code right after this line:

</div><!-- .inside-article -->

INSERT YOUR CODE HERE

</article><!-- #post-## -->

This puts the comment form on only your post pages.

OR use a plugin!

https://github.com/zgordon/wp-commento

You will need to modify /includes/enqueue-scripts.php to your commento.io domain.

Réflexions finales

I had a little snafu with receiving the confirmation e-mail once I had setup Commento and there wasn't an option to request another to confirm my e-mail so I had to reset the docker containers.

I removed the restart parameter from the docker config file and ran the commend, docker-compose down to shut them down politely. Then, docker volume prune to delete all the Docker volumes on the server and last docker-compose up –build.

Remerciements spéciaux

TESMAT au Supercharger de Tesla

TESMAT

TESMAT pourrait être le matelas idéal pour votre prochaine sieste au Supercharger, votre prochain voyage en camping ou le cadeau parfait pour votre propriétaire de Tesla Model 3/Y préféré. Vous pouvez utiliser mon code promo pour économiser sur votre achat.

En savoir plus :

luminar neo logo pour fonds clairs mis à jour | graydonschwartz.com

Luminar Neo

Utilisez le bouton ci-dessous et n'hésitez pas à utiliser le code de réduction (GRAYDON) pour vous donner un réduction de prix lors du paiement sur Luminar :

Il se peut que je reçoive une petite commission pour mon approbation, mes recommandations, mes témoignages et / ou mes liens vers les produits ou services mentionnés ci-dessus. Votre achat me permet de vous apporter plus de photographies, de guides de voyage et de voyages autour du monde.

Par Graydon Schwartz

Pour en savoir plus sur Graydon, consultez le site À propos de moi page.