Skip to content

Commit

Permalink
Added support for hashover self-hosted commenting system.
Browse files Browse the repository at this point in the history
  • Loading branch information
drtutut committed May 11, 2017
1 parent ca37f5b commit 454d8ab
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
6) Search engine support (auto generated)
7) A beautiful theme
8) Theme customization support
9) Commenting (implemented using disqus/duoshuo)
9) Commenting (implemented using disqus/duoshuo/hashover)
10) Website traffic analytics (implemented using google analytics)
11) Index/about page support (auto generated if no default is provided)
12) Site preview
Expand Down Expand Up @@ -64,9 +64,10 @@
: (require 'org-page)
: (setq op/repository-directory "path/to/your/org/repository")
: (setq op/site-domain "http://your.personal.site.com/")
: ;;; for commenting, you can choose either disqus or duoshuo
: ;;; for commenting, you can choose either disqus, duoshuo or hashover
: (setq op/personal-disqus-shortname "your_disqus_shortname")
: (setq op/personal-duoshuo-shortname "your_duoshuo_shortname")
: (setq op/hashover-comments t)
: ;;; the configuration below are optional
: (setq op/personal-google-analytics-id "your_google_analytics_id")

Expand Down
1 change: 1 addition & 0 deletions doc/quick-guide.org
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
: ;;; the configuration below you should choose one, not both
: (setq op/personal-disqus-shortname "your_disqus_shortname") ;; your disqus commenting system
: (setq op/personal-duoshuo-shortname "your_duoshuo_shortname") ;; your duoshuo commenting system
: (setq op/hashover-comments t) ;; activate hashover self-hosted comment system

* Publication

Expand Down
2 changes: 2 additions & 0 deletions op-template.el
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ similar to `op/render-header'. `op/highlight-render' is `js' or `htmlize'."
("author" (or (op/read-org-option "AUTHOR")
user-full-name
"Unknown Author"))
("hashover-comment" (and (boundp 'op/hashover-comments)
op/hashover-comments))
("disqus-id" uri)
("disqus-url" (get-full-url uri))
("disqus-comment" (and (boundp 'op/personal-disqus-shortname)
Expand Down
6 changes: 6 additions & 0 deletions op-vars.el
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,12 @@ the date in the aaaa-mm-dd format. It should return a string
representing the date in its new format."
:group 'org-page :type 'function)

(defcustom op/hashover-comments nil
"use hashover commenting system"
:group 'org-page
:type 'boolean)


(provide 'op-vars)

;;; op-vars.el ends here
5 changes: 5 additions & 0 deletions themes/mdo/templates/footer.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
})();
</script>
{{/duoshuo-comment}}
{{#hashover-comment}}
<div id="hashover"></div>
<script type="text/javascript" src="/hashover.php"></script>
<noscript>You must have JavaScript enabled to use the comments.</noscript>
{{/hashover-comment}}
</section>
{{/show-comment}}
<script src="//code.jquery.com/jquery-latest.min.js"></script>
Expand Down

0 comments on commit 454d8ab

Please sign in to comment.