Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jekyll-mail-comments

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jekyll-mail-comments

  • 0.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Jekyll Mail comments

This gem fetches email from your mailbox by filtering with specific suffix, it makes data files which you can use to generate Jekyll comments.

How it works ?

  • You've to setup mailbox, on Jekyll pages you will have mailto link which opens native system mail client with pre filled subject.
  • Person who wants to comment message write message to your specific email address.
  • Fetch program watch for special subject suffix to distinct comments from other emails
  • Fetch program generate json based data files which perfectly fits to Jekyll data system https://jekyllrb.com/docs/datafiles/

What is the purpose ?

  • Jekyll static site generator has no comments system
  • Don't want to inject 3rdparty javascript code to work with SaSS comments system
  • Any RDBS for static site generator is overhead

How-to Setup

  • Go to your jekyll site cd ~/jekull_site
  • Install gem gem install mail_comments
  • Setup credentials

There few credentials your have to setup before run:

** MC_LOGIN - Login to imap server ** MC_PASSWORD - Password for imap server ** MC_HOST - IMAP server hostname ** MC_PORT - IMAP server port ** MC_SUBJECT_SUFFIX - Suffix to filter comments

  • You have put this as environment variables see .env.dist
  • jekyll-mail-comments-fetch
  • After that you will get comments data files inside Jekyll data directory - _data

After that if new comments are present it will generate data files with comments which you can process with Jekyll with data tag. See here. https://jekyllrb.com/docs/datafiles/ or below.

Here is how to you can include comments block into your Jekyll post template


	<section>
	    {% include comments-count.html replies_to=page.path %}
	    
	    {% if comment_count %}
	    <h2>Comments ({{- comment_count -}}) <small class="text-muted">Read carefuly </small> </h2>
	    {% include comments.html replies_to=page.path indent_class="ml-auto" title=page.title %}
	    {% else %}
	    <h2>No comments here yet <small class="text-muted">Write here gently</small></h2>
	    {% endif %}
	    <div class="mt-3"><a class="btn btn-outline-secondary btn-block" href="mailto:{{site.comments.email}}?subject=RE:{{page.path}}:{{site.comments.subject_suffix}}:{{post.title}}">Write a comment</a> </div>
	</section>

Templates can be found inside templates directory of this gem.

Credits

Inspiration while searching for already existing gem for email comments

Example

FAQs

Package last updated on 02 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc