';
+
+ // Chose the GitHub theme for the comments
+
+ $html .= '
';
+ $html .= '';
+ $html .= '';
+ $html .= '
';
+
+
+ return $html;
+ }
+
+ public function pageEnd()
+ {
+ global $url;
+ global $WHERE_AM_I;
+
+// Do not shows Utterances on page not found
+
+ if ($url->notFound()) {
+ return false;
+ }
+
+ if ($WHERE_AM_I==='page') {
+ global $page;
+ if ($page->published() && $this->getValue('enablePages')) {
+ return $this->javascript();
+ }
+ if ($page->isStatic() && $this->getValue('enableStatic')) {
+ return $this->javascript();
+ }
+ if ($page->sticky() && $this->getValue('enableSticky')) {
+ return $this->javascript();
+ }
+ }
+
+ return false;
+ }
+
+
+// Utterances javascript
+
+ private function javascript()
+ {
+ global $page;
+ $pageURL = $page->permalink();
+ $pageID = $page->uuid();
+ $myUtterancesRepo = $this->getValue('myUtterancesRepo');
+ $utterancesTheme = $this->getValue('utterancesTheme');
+
+$code = <<
+
+
+EOF;
+ return $code;
+ }
+
+}
diff --git a/readme.md b/readme.md
new file mode 100644
index 0000000..003c784
--- /dev/null
+++ b/readme.md
@@ -0,0 +1,17 @@
+# GitHub comments plugin for Bludit
+
+GitHub Comments is a plugging for [Bludit File Manager System](https://www.bludit.com/). This plugin was modeled after the Disqus plugin for Bludit.
+
+The plugin uses [Utterrrances](https://utteranc.es/), an open source lightweight comments system built on GitHub issues.
+
+## How to install
+
+1. Create an open GitHub repository.
+2. Install the [Utterances App](https://github.com/apps/utterances) in your GitHub repository.
+3. Download GitHub Comments and extract it in your **bl-plugins** directory.
+4. Go to your Bludit admin panel and activate the GitHub Comments plugin.
+5. Go to the pluging settings and enter your repository using the format **OWNER/REPO** . Do not add the url address and double check white spaces.
+
+## Demo
+
+Check the comment section on the blog.