惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 三生石上(FineUI控件)
Hugging Face - Blog
Hugging Face - Blog
M
MIT News - Artificial intelligence
T
Tailwind CSS Blog
Webroot Blog
Webroot Blog
S
Secure Thoughts
N
News and Events Feed by Topic
月光博客
月光博客
TaoSecurity Blog
TaoSecurity Blog
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog RSS Feed
N
News | PayPal Newsroom
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
小众软件
小众软件
Recent Commits to openclaw:main
Recent Commits to openclaw:main
P
Privacy & Cybersecurity Law Blog
GbyAI
GbyAI
K
Kaspersky official blog
WordPress大学
WordPress大学
P
Proofpoint News Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
博客园 - 叶小钗
W
WeLiveSecurity
Jina AI
Jina AI
The Cloudflare Blog
Project Zero
Project Zero
Simon Willison's Weblog
Simon Willison's Weblog
V
Vulnerabilities – Threatpost
L
LangChain Blog
Forbes - Security
Forbes - Security
PCI Perspectives
PCI Perspectives
Engineering at Meta
Engineering at Meta
Google DeepMind News
Google DeepMind News
Recorded Future
Recorded Future
博客园 - 【当耐特】
H
Heimdal Security Blog
A
About on SuperTechFans
Cisco Talos Blog
Cisco Talos Blog
T
Threat Research - Cisco Blogs
云风的 BLOG
云风的 BLOG
Spread Privacy
Spread Privacy
L
LINUX DO - 最新话题
L
Lohrmann on Cybersecurity
Last Week in AI
Last Week in AI
Google DeepMind News
Google DeepMind News
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
I
Intezer
Martin Fowler
Martin Fowler
S
Securelist
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint

RisingIce

2024年终总结 | RisingIce 使用大模型总结B站视频 | RisingIce 使用Vercel搭建Umami统计 | RisingIce Vercel域名被墙的问题 | RisingIce 修改anzhiyu主题的TianliGPT插件为其他大模型API | RisingIce Ubuntu挂载群晖共享文件夹与Comfyui模型迁移 | RisingIce 记一次conda环境激活却不起作用的问题及解决方法 | RisingIce 《程序员的README》- 随笔 | RisingIce Hello Word的由来 | RisingIce
部署Twikoo评论系统 | RisingIce
RisingIce · 2024-04-15 · via RisingIce

文章摘要 RisingIce

加载中...|

此内容由DeepSeek根据文章生成,未经过人工审核,仅用于文章内容的解释与总结 投诉

一、前言 ​

最近想给站点加上评论系统,准备使用Vercel+免费的Mongodb cloud的形式来部署Twikoo,这样又省了1笔钱简单快捷,这里就记录下Twikoo的搭建过程

Twikoo官方文档:Twikoo 文档

Anzhiyu主题文档:安知鱼主题官方文档

二、准备工作 ​

  • 注册MongoDB
  • 注册Vercel
  • twikoo顺手点一个Star
  • 域名(解决Vercel部署之后被墙的问题)

三、步骤 ​

3.1 MongoDB设置 ​

登录MongoDB之后, 点击Create 创建 deployment

选择免费的M0数据库,服务提供商选择亚马逊云(AWS),地区选择 Singapore

创建数据库用户与密码,点击QuickStart,填入UsernamePasswordCreate USer

设置ip白名单,点击Network Access,选择 ADD IP ADDRESS

如果是Vercel方式部署的Twikoo需要将MongoDB设置为全网可访问的状态,即添加0.0.0.0/0:

https://img.picgo.net/2024/08/22/imaged19136767592adfb.pnghttps://img.picgo.net/2024/08/22/imaged19136767592adfb.png

ps:具体原因参考:How can I allowlist IP addresses for a deployment?

返回Cluster,点击Connect

选择Drivers

记录下这串神秘代码连接操作符

3.2 Vercel部署Twikoo ​

点击下方的按钮,一键部署到Vercel

DeployDeploy

配置环境变量,进入部署的twikoo项目之后,点击Settings -> Environment Variables,添加MONGODB_URI的KEY,Value为之前的连接操作符(注意,需要将其中的password替换成真实的密码

重新部署Twikoo项目,选择Deployment,点击Redeploy

等待项目重新部署,进入Project界面,Twikoo成功部署之后应显示"Twikoo 云函数运行正常"

为Twikoo增加一个域名,具体可参考:解决Vercel域名被污染的问题

3.3 Anzhiyu主题配置 ​

打开_config_anzhiyu.yml,找到twikooenvId改为你的twikoo地址

Ps:(可选,不影响使用)由于anzhiyu自带的twikoo前端比较旧,所以需要修改twikoo的前端js,找到CDN -> twikoo

shell

https://s4.zstatic.net/ajax/libs/twikoo/对应后端的版本号/twikoo.all.min.js

Ps:具体的页面开启评论系统参考anzhiyu官方文档

四、最后 ​

加上评论系统之后,站点的功能也是更加完善了,后面考虑一下加一些更好玩的东西