add artalk.js

This commit is contained in:
2022-07-06 15:47:20 +08:00
parent e245893f1b
commit ce1c87a5d1
2 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
version: "3.5"
services:
artalk:
container_name: artalk
image: artalk/artalk-go
ports:
- 23333:23366
volumes:
- D:\cong\compose-template\_tmp\artalk\data:/data
restart: unless-stopped
# https://artalk.js.org/
# 生成配置文件
# docker run -it -v $(pwd)/data:/data --rm artalk/artalk-go gen config data/artalk-go.yml
# unset HISTFILE # 临时禁用 history 防止密码在历史记录中出现
# htpasswd -bnBC 10 "" "your_password" | tr -d ':'

View File

@@ -0,0 +1,17 @@
<!-- CSS -->
<link href="http://127.0.0.1:23333/dist/Artalk.css" rel="stylesheet">
<!-- JS -->
<script src="http://127.0.0.1:23333/dist/Artalk.js"></script>
<!-- Artalk -->
<div id="Comments"></div>
<script>
new Artalk({
el: '#Comments', // 绑定元素的 Selector
pageKey: 'index.html', // 固定链接 (留空自动获取)
pageTitle: '关于引入 Artalk 这档子事', // 页面标题 (留空自动获取)
server: 'http://127.0.0.1:23333', // 后端地址
site: '默认站点', // 你的站点名
})
</script>