Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Comments

A comment thread under every post of your Kite site.

CI Latest release Kite 0.1 or later Apache License 2.0

English · 简体中文

A Waline comment thread under a post, in light and dark mode

Comments is an official plugin for Kite. Pick a comment service in the studio and every post gets a thread, placed after the post and styled to match the page.

Giscus Waline Twikoo

Features

  • Three services. Giscus keeps the comments in the Discussions of a GitHub repository; Waline and Twikoo run on a server of your own, or on Tencent CloudBase for Twikoo.
  • Threads that survive a new address. With Giscus, a post is matched to its discussion by its id, so renaming a post or moving the site keeps its comments.
  • Dark when the page is. The thread follows the page into dark mode and back, whether the theme follows the system or has a switch of its own.
  • Where a reader expects it. At the end of the post, after the links to the posts around it, or wherever your theme marks.
  • Up to each post. comments: false in a post's front matter leaves its thread out; pages can have one too.
  • Quick to load in mainland China. Waline and Twikoo load from jsDelivr, unpkg or npmmirror, as you choose.

Install

  1. Download comments-<version>.zip from the latest release.
  2. In Kite's studio, open Plugins, drop the zip on Upload plugin, and switch it on.

Or from the command line, inside your site:

kite plugin add comments-0.1.0.zip
kite plugin enable comments

It needs Kite 0.1 or later.

Settings

Under Plugins → Comments → Settings, the form shows only what the chosen service needs. A preview at localhost says which settings are still missing where the thread would be.

Setting Service What it is
Service Giscus, Waline or Twikoo
Repository, Repository ID, Discussion category, Category ID Giscus Copy them from giscus.app once the repository and category are chosen there
Match a post to its discussion by Giscus The post's id (the default), the path of its address, its whole address, or its title
Server address Waline Where your Waline server runs
Environment Twikoo Your Twikoo server's address, or its environment ID on Tencent CloudBase
Under pages too Also puts a thread under pages such as About
Load scripts from Waline, Twikoo jsDelivr, unpkg or npmmirror

For theme authors

The thread goes at the end of the page's <main>. To put it somewhere else, mark the spot:

<div data-kite-comments></div>

Releasing

Set version in plugin.yaml, commit, and push a tag of the same version, such as v0.1.0. The release workflow packs dist/comments-<version>.zip and attaches it to a GitHub release. make zip packs the same file locally, and kite plugin verify . checks the plugin the way a site will.

More official plugins

Plugin What it adds
Analytics Visit counts with Baidu Tongji, Google Analytics, Umami or Plausible
Math and Diagrams TeX math with KaTeX, and mermaid code blocks drawn as diagrams
Search Search in the reader's browser, with nothing to run

License

Apache License 2.0.

About

A comment thread under every post of your Kite site, with Giscus, Waline or Twikoo.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages