Remark42安装配置
安装 wget https://github.com/umputun/remark42/releases/download/v1.11.3/remark42.linux-amd64.tar.gz -O remark42.linux-amd64.tar.gz tar xzf remark42.linux-amd64.tar.gz mv remark42.linux-amd64 /usr/local/bin 添加用户设置权限 useradd -r remark42 mkdir -m 770 /var/www/remark42 chown :remark42 /var/www/remark42 mkdir -m 770 /etc/remark42 chown :remark42 /etc/remark42 设置配置文件/启动 nano /etc/remark42/remark42.conf REMARK_URL=https://comment.techlayman.com SECRET=some_secret_key_phrase_1234 SITE=techlayman AUTH_ANON=false EMOJI=true AUTH_GITHUB_CID=xxx AUTH_GITHUB_CSEC=xxx nano /etc/systemd/system/remark42.service [Unit] Description=remark42 comment engine After=network.target [Service] User=remark42 Group=remark42 EnvironmentFile=/etc/remark42/remark42.conf WorkingDirectory=/var/www/remark42 Restart=always RestartSec=5 ExecStart=/usr/local/bin/remark42.linux-amd64 server [Install] WantedBy=multi-user.target systemctl enable --now remark42 Hugo模板修改 comments.html模板 nano layouts/partials/comments.html {{- with .Site.Params.comments.remark42 -}} <div id="remark42"></div> <script> var remark_config = { host: '{{ ....