<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Isso on RESEARCHUT</title><link>https://researchut.com/tags/isso/</link><description>Recent content in Isso on RESEARCHUT</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>rrs@researchut.com (Ritesh Raj Sarraf)</managingEditor><webMaster>rrs@researchut.com (Ritesh Raj Sarraf)</webMaster><lastBuildDate>Wed, 30 Oct 2019 19:11:27 +0530</lastBuildDate><atom:link href="https://researchut.com/tags/isso/index.xml" rel="self" type="application/rss+xml"/><item><title>Comments on Hugo with Isso</title><link>https://researchut.com/blog/Comments_on_Hugo_with_Isso/</link><pubDate>Wed, 30 Oct 2019 19:11:27 +0530</pubDate><author>rrs@researchut.com (Ritesh Raj Sarraf)</author><guid>https://researchut.com/blog/Comments_on_Hugo_with_Isso/</guid><description>&lt;h2 id="integrating-comments-on-hugo-with-isso">Integrating Comments on Hugo with Isso&lt;/h2>
&lt;p>Oh! Boy. Finally been able to get something set up almost to my liking. After moving away from Drupal to Hugo, getting the &lt;em>commenting system&lt;/em> in place was challenging. There were many solutions but I was adamant to what I wanted.&lt;/p>
&lt;ul>
&lt;li>Simple. Something very simple so that I can spend very limited time to tickle with (especially 2 years down the line)&lt;/li>
&lt;li>Independent. No Google/Facebook/3rd Party dependency&lt;/li>
&lt;li>Simple workflow. No Github/Gitlab/Staticman dependency&lt;/li>
&lt;li>Simple moderation workflow&lt;/li>
&lt;/ul>
&lt;h3 id="simplicity">Simplicity&lt;/h3>
&lt;p>First, the migration away from Drupal itself was a &lt;em>PITA&lt;/em>. I let go of all the comments there. Knowing my limited web skills, it was the foremost requisite to have something simplest as possible.&lt;/p>
&lt;h3 id="independent">Independent&lt;/h3>
&lt;p>Tracking is becoming very very common. While I still have &lt;em>Google Analytics&lt;/em> enabled on my website, that is more of a personal choice as I would like to see some monthly reporting. And whenever I want, I can just quietly disable it, if in case it becomes perversely invasive. As for the commenting system, I can be assured now that it wouldn&amp;rsquo;t depend on a 3rd party service.&lt;/p>
&lt;h3 id="simple-workflow">Simple workflow&lt;/h3>
&lt;p>Lots and lots of people moved to static sites and chose a self-hosted model on Github (and other similar services). Then, service like Staticman, complemented it with integration of a commenting system, with Github&amp;rsquo;s Issue Tracker workflow.&lt;/p>
&lt;p>From my past experiences, my quest now has been to keep my setups as simple as possible. For example, for passwords, I wouldn&amp;rsquo;t want to ever again rely on &lt;strong>Seahorse or Kwallet&lt;/strong> etc. Similarly, after getting out of the clutch of Drupal, I wanted to resort back to keeping the website content structure simple. And Hugo does a good job there. And so was the quest for the commenting system.&lt;/p>
&lt;h3 id="simple-moderation-workflow">Simple moderation workflow&lt;/h3>
&lt;p>SPAM is inevitable. I wanted to have something &lt;em>simple, basic and well tested&lt;/em>. What better than the good old email. Every comment added is put into a moderation queue and the admin is sent with an email for the same, including a unique approve/reject link in the email.&lt;/p>
&lt;h2 id="isso-commenting-system">Isso Commenting System&lt;/h2>
&lt;p>To describe it:&lt;/p>
&lt;pre tabindex="0">&lt;code>Description-en: lightweight web-based commenting system
A lightweight commenting system written in Python. It supports CRUD comments
written in Markdown, Disqus import, I18N, website integration via JavaScript.
Comments are stored in SQLite.
&lt;/code>&lt;/pre>&lt;p>I had heard the name a couple months ago but hadn&amp;rsquo;t spent much time. This week, with some spare time on, I stumbled across some good articles about setup and integration for Isso.&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://angristan.xyz/add-comments-to-your-blog-with-isso/">https://angristan.xyz/add-comments-to-your-blog-with-isso/&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://stiobhart.net/2017-02-24-isso-comments/">https://stiobhart.net/2017-02-24-isso-comments/&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://therandombits.com/2018/12/how-to-add-isso-comments-to-your-site/">https://therandombits.com/2018/12/how-to-add-isso-comments-to-your-site/&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>The good part is that Isso is already packaged for Debian so I didn&amp;rsquo;t have to go through the source based setup. I did spend some time fiddling around with the &lt;strong>.service vs .socket&lt;/strong> discrepancies but my desperate focus was to get the bits together and have the commenting system in place.&lt;/p>
&lt;p>Once I get some free time again, I&amp;rsquo;d like to extract useful information and file a bug report on Debian BTS. But for now, Thank You to the package maintainer for packaging/maintaining Isso for Debian.&lt;/p>
&lt;h3 id="integration-for-my-setup-nginx--hugo--beautifulhugo--isso">Integration for my setup (nginx + Hugo + BeautifulHugo + Isso)&lt;/h3>
&lt;p>For &lt;strong>nginx&lt;/strong>, just the following addition lines to ingerate &lt;strong>Isso&lt;/strong>&lt;/p>
&lt;pre tabindex="0">&lt;code> location /isso {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:8000;
}
&lt;/code>&lt;/pre>&lt;p>For &lt;strong>Hugo and BeautifulHugo&lt;/strong>&lt;/p>
&lt;pre tabindex="0">&lt;code>commit 922a88c41d784dc59aa17a9cbdba4a1898984a3e (HEAD -&amp;gt; isso)
Author: Ritesh Raj Sarraf &amp;lt;rrs@debian.org&amp;gt;
Date: Tue Oct 29 12:52:13 2019 +0530
Add display content for isso
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 0ab1bf5..afda94e 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -55,6 +55,11 @@
&amp;lt;/ul&amp;gt;
{{ end }}
+ {{&amp;#34;&amp;lt;!-- begin comments //--&amp;gt;&amp;#34; | safeHTML}}
+ &amp;lt;section id=&amp;#34;isso-thread&amp;#34;&amp;gt;
+
+ &amp;lt;/section&amp;gt;
+ {{&amp;#34;&amp;lt;!-- end comments //--&amp;gt;&amp;#34; | safeHTML}}
{{ if (.Params.comments) | or (and (or (not (isset .Params &amp;#34;comments&amp;#34;)) (eq .Params.comments nil)) (and .Site.Params.comments (ne .Type &amp;#34;page&amp;#34;))) }}
{{ if .Site.DisqusShortname }}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 2182534..161d3f0 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -81,6 +81,11 @@
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
+
+ {{ &amp;#34;&amp;lt;!-- isso --&amp;gt;&amp;#34; | safeHTML }}
+ &amp;lt;script data-isso=&amp;#34;{{ .Site.BaseURL }}isso/&amp;#34; src=&amp;#34;{{ .Site.BaseURL }}isso/js/embed.min.js&amp;#34;&amp;gt;&amp;lt;/script&amp;gt;
+ {{ &amp;#34;&amp;lt;!-- end isso --&amp;gt;&amp;#34; | safeHTML }}
+
&amp;lt;/header&amp;gt;
{{ else }}
&amp;lt;div class=&amp;#34;intro-header&amp;#34;&amp;gt;&amp;lt;/div&amp;gt;
&lt;/code>&lt;/pre>&lt;p>And the JavaScript:&lt;/p>
&lt;pre tabindex="0">&lt;code>commit 3e1d52cefe8be425777d60387c8111c908ddc5c1
Author: Ritesh Raj Sarraf &amp;lt;rrs@debian.org&amp;gt;
Date: Tue Oct 29 12:44:38 2019 +0530
Add javascript for isso comments
diff --git a/static/isso/js/embed.min.js b/static/isso/js/embed.min.js
new file mode 100644
index 0000000..1d9a0e3
--- /dev/null
+++ b/static/isso/js/embed.min.js
@@ -0,0 +1,1430 @@
+/**
+ * @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
+ * Available via the MIT or new BSD license.
+ * see: http://github.com/jrburke/almond for details
+ */
+
+/*
+ Copyright (C) 2013 Gregory Schier &amp;lt;gschier1990@gmail.com&amp;gt;
+ Copyright (C) 2013 Martin Zimmermann &amp;lt;info@posativ.org&amp;gt;
+
+ Inspired by http://codepen.io/gschier/pen/GLvAy
+*/
....snipped......
&lt;/code>&lt;/pre>&lt;p>That&amp;rsquo;s pretty much it. Happy Me :-)&lt;/p></description></item></channel></rss>