feat(widget): 添加 postSlug 配置以支持多语言/多路径评论聚合
- 在配置面板和核心逻辑中新增 postSlug 字段,允许自定义评论标识符 - 更新前端配置文档,说明 postSlug 的用途和默认行为 - 当未配置 postSlug 时,默认仍使用 window.location.pathname
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
h1 {
|
||||
margin-bottom: 20px;
|
||||
color: #333;
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
|
||||
.config-panel {
|
||||
@@ -133,6 +134,10 @@
|
||||
<label>Site ID(可选,用于隔离不同站点/环境的评论)</label>
|
||||
<input type="text" id="siteId" placeholder="例如:blog、dev、zishu.me" />
|
||||
</div>
|
||||
<div class="config-item">
|
||||
<label>自定义 postSlug(可选,留空则使用当前路径)</label>
|
||||
<input type="text" id="postSlug" placeholder="例如:post-unique-id-001,用于多语言/多路径聚合" />
|
||||
</div>
|
||||
<div class="config-item">
|
||||
<label>主题</label>
|
||||
<select id="theme">
|
||||
|
||||
Reference in New Issue
Block a user