David Yu Blog

輕量化github issue留言插件 utterances

Word count: 188Reading time: 1 min
2022/07/02

優點

  1. 無廣告
  2. 無權限要太多的問題
  3. 輕量化
  4. Github風格

安裝(Vue)

  1. 先在你的Github上安裝

    https://github.com/apps/utterances

  2. 在vue專案安裝套件
    https://www.npmjs.com/package/vue-utterances

    1
    npm i vue-utterances

使用(CLI)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<template>
<vue-utterances repo="khalby786/vue-utterances" theme="github-light" issue-term="pathname" />
</template>

<script>
import VueUtterances from "vue-utterances";

export default {
...

components: {
VueUtterances
}

...
}
</script>

屬性說明

repo 指定該專案的Github repo,使用者留言都會map在該repo issue裡面
theme 指定留言板風格,詳情見utterances官網
issue-term 如何指定issue title。我這裡選title, 它會根據網頁title決定issue title

utterances官網 :

https://utteranc.es/?installation_id=26169123&setup_action=install

參考資料

https://www.jkg.tw/p3350/

CATALOG
  1. 1. 優點
  2. 2. 安裝(Vue)
  3. 3. 使用(CLI)
  4. 4. 屬性說明
  5. 5. 參考資料