diff options
| author | 2025-05-03 09:28:16 +0000 | |
|---|---|---|
| committer | 2025-05-03 09:28:16 +0000 | |
| commit | 4d6408015bab9f2c0b3b5820ed6d048f868f5c1f (patch) | |
| tree | ccabd8adc31626b3669c3ee728fa50ddd708f8ac /docs/locales/zh/configuration | |
| parent | [chore/cicd] Snapshot only if source code files have changed (#4115) (diff) | |
| download | gotosocial-4d6408015bab9f2c0b3b5820ed6d048f868f5c1f.tar.xz | |
[docs/zh] Update zh docs: synced to 6c879186 (#4117)
# Description
This PR updates the Chinese documentation to 6c879186 (the latest commit at present).
It also fixed a small typo in the original docs. Since the change is so minor, I didn't make a separate PR.
Last docs/zh update PR: #3884
## Checklist
Please put an x inside each checkbox to indicate that you've read and followed it: `[ ]` -> `[x]`
If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want).
- [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md).
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4117
Co-authored-by: cdn0x12 <git@cdn0x12.dev>
Co-committed-by: cdn0x12 <git@cdn0x12.dev>
Diffstat (limited to 'docs/locales/zh/configuration')
| -rw-r--r-- | docs/locales/zh/configuration/advanced.md | 17 | ||||
| -rw-r--r-- | docs/locales/zh/configuration/database.md | 7 |
2 files changed, 24 insertions, 0 deletions
diff --git a/docs/locales/zh/configuration/advanced.md b/docs/locales/zh/configuration/advanced.md index c41f3e47d..d9ecab845 100644 --- a/docs/locales/zh/configuration/advanced.md +++ b/docs/locales/zh/configuration/advanced.md @@ -149,4 +149,21 @@ advanced-csp-extra-uris: [] # 选项: ["block", "allow", ""] # 默认: "" advanced-header-filter-mode: "" + +# 布尔值。启用基于工作量证明的爬虫威慑机制, +# 作用于账户页和贴文页面。这将为每个 HTTP 客户端生成一个唯一确定 +# 的质询,需要由客户端在访问上述端点时完成。 +# 完成后,客户端会获得一个 Cookie,允许其在 1 小时窗口内免验证访问。 +# +# 这样做的结果是,它理论上使得对这些端点的抓取在经济上变得不可行, +# 同时对你自己的实例的性能影响可以忽略不计。 +# +# 缺点是它要求客户端启用 JavaScript。 +# +# 更多详情请查阅文档: +# https://docs.gotosocial.org/zh-cn/latest/admin/scraper_deterrence +# +# 选项: [true, false] +# 默认值: true +advanced-scraper-deterrence: false ```
\ No newline at end of file diff --git a/docs/locales/zh/configuration/database.md b/docs/locales/zh/configuration/database.md index 56e9ebdb6..d0b55aa9b 100644 --- a/docs/locales/zh/configuration/database.md +++ b/docs/locales/zh/configuration/database.md @@ -42,6 +42,13 @@ create user gotosocial with password 'some_really_good_password'; grant all privileges on database gotosocial to gotosocial; ``` +如果开始使用时你使用的是 Postgres 14 或更高版本,或者遇到 `error executing command: error creating dbservice: db migration error: ERROR: permission denied for schema public`,你应当授予你的 db 用户 `CREATE` 权限 *(这 **必须** 在连接到 gotosocial 数据库的 postgres shell 中执行)*: + +```psql +GRANT CREATE ON SCHEMA public TO gotosocial; +SELECT has_schema_privilege('gotosocial', 'public', 'CREATE'); -- should return t +``` + GoToSocial 使用 ULIDs(全局唯一且按字典顺序可排序的标识符),这在非英文排序环境中不起作用。因此,创建数据库时使用 `C.UTF-8` 地区设置很重要。在已经使用非 C 地区初始化的系统上,必须使用 `template0` 原始数据库模板才能进行。 如果你希望使用特定选项连接到 Postgres,可以使用 `db-postgres-connection-string` 定义连接字符串。如果 `db-postgres-connection-string` 已定义,则所有其他与数据库相关的配置字段将被忽略。例如,可以使用 `db-postgres-connection-string` 连接到 `mySchema`,用户名为 `myUser`,密码为 `myPass`,在 `localhost` 上,数据库名称为 `db`: |
