Jekyll is the coolest static-everything blogging platform out there, but if you came from a more dynamic blogging platform, you probably miss comments. I know I do.
Anyway, here's a handy dandy include for Jekyll that adds real time comments to your blog without any backend code. The backend part is handled by Firebase
Interested? Check out a live demo.
Create a new Firebase for your blog comments.
Copy the files from _includes into the _includes
folder in
the root of your blog. Create the directory if it does not already exist.
Edit your _config.yaml
and specify fbc-comments-firebase
, the URL of the Firebase to host your comments, e.g.
https://jekyll-comments-demo.firebaseio.com/
_includes/firebase-comment-form-template.html
represents your
comments form. Edit it to match your blog.
fbc-*
element ids and data-auth-provider
attributes. They are required by the plugin to function._includes/firebase-comment-template.html
represents an individual
comment. Edit it to match your blog.
<%=link %>
- Commenter's profile URL<%=picture %>
- The beautiful mug shot of your commenter<%=displayName %>
- Their name<%=comment %>
- What they said about your stuffEnable SimpleLogin and add API keys and secrets to forge for Facebook, Twitter, GitHub, and Google.
Paste the contents of firebase-security-rules.json
into the
security rules pane for your Firebase, or edit firebase.json
to deploy them to Firebase Hosting.
Add the include to the appropriate layout files.
{% include firebase-comments.ext %}
Deploy your blog, share your posts with your friends, and watch the comments arrive in real time.