docs(config): 重构配置文档结构并简化前端使用说明

- 删除 widget/CONFIG.md,将配置参数统一到 docs/guide/frontend-config.md
- 简化 widget/README.md,移除详细代码示例并指向完整文档链接
- 更新前端配置说明,优化注释并移除冗余参数
This commit is contained in:
anghunk
2026-01-14 13:31:16 +08:00
parent d3ca6a0bfa
commit 94653bfac8
3 changed files with 4 additions and 102 deletions

View File

@@ -15,16 +15,9 @@
```html
<script>
const comments = new CWDComments({
el: '#comments',
apiBaseUrl: 'https://your-api.example.com',
postSlug: 'my-post',
postTitle: '文章标题',
postUrl: 'https://example.com/my-post',
theme: 'light',
pageSize: 20,
avatarPrefix: 'https://gravatar.com/avatar',
adminEmail: 'admin@example.com',
adminBadge: '博主'
el: '#comments', // 容器 id
apiBaseUrl: 'https://your-api.example.com', // 你部署的api地址
postSlug: 'my-post', // 当前页面路径,可使用博客程序支持的 url 模板路径
});
comments.mount();
</script>