From c4a1c21f49eeb22b0611646c7e3d11da0679e673 Mon Sep 17 00:00:00 2001 From: ClovertaTheTrilobita Date: Sat, 29 Aug 2026 17:17:39 +0800 Subject: [PATCH] update doc --- .github/workflows/deploy.yml | 4 ++-- docs/GithubActions-en.md | 31 +++++++++++++++++++++++++------ docs/GithubActions.md | 31 +++++++++++++++++++++++++------ 3 files changed, 52 insertions(+), 14 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0d5cf0f..fdfe6d2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -108,7 +108,7 @@ jobs: - name: Submit to IndexNow uses: bojieyang/indexnow-action@v3 with: - sitemap-location: '${{ env.SITE_URL }}sitemap-index.xml' + sitemap-location: '${{ vars.SITE_URL }}sitemap-index.xml' key: ${{ vars.INDEXNOW_KEY }} lastmod-required: false endpoint: api.indexnow.org @@ -179,7 +179,7 @@ jobs: - name: Submit to IndexNow uses: bojieyang/indexnow-action@v3 with: - sitemap-location: '${{ env.SITE_URL }}sitemap.xml' + sitemap-location: '${{ vars.SITE_URL }}sitemap.xml' key: ${{ vars.INDEXNOW_KEY }} lastmod-required: false endpoint: api.indexnow.org diff --git a/docs/GithubActions-en.md b/docs/GithubActions-en.md index 67b9348..0d92f58 100644 --- a/docs/GithubActions-en.md +++ b/docs/GithubActions-en.md @@ -88,10 +88,29 @@ Simply copy all contents of your `.env` file into the variable value. Also in `Settings > Secrets and variables > Actions`, add four `Repository variables`: -| Variable Name | Value Example | -| ------------- | --------------------------------------------------------------------------- | -| `DEPLOY_HOST` | Server IP address, for example `192.168.1.1` | -| `DEPLOY_PATH` | Deployment path on the server, for example `/www/wwwroot/blog.cloverta.top` | -| `DEPLOY_PORT` | SSH port of the server, usually `22` | -| `DEPLOY_USER` | Login username, for example `root` | +| **Variable Name** | **Value** | +| ----------------- | ------------------------------------------------------------ | +| `DEPLOY_HOST` | The IP address of your server, e.g. `192.168.1.1` | +| `DEPLOY_PATH` | The deployment path on the server, e.g. `/www/wwwroot/blog.cloverta.top` | +| `DEPLOY_PORT` | The SSH port of your server, usually `22` | +| `DEPLOY_USER` | The login user, e.g. `root` | +| `INDEXNOW_KEY` | A string used as the key submitted to IndexNow. You can directly use `888c64d8d7d9a2b605bcd5277021a414` | +| `SITE_URL` | Your domain name, e.g. `https://blog.cloverta.top/`. Make sure to include the trailing slash | +#### About `INDEXNOW_KEY` + +The repository's `Actions` workflow will automatically submit updates to [IndexNow](https://www.indexnow.org/). You need to generate a random key in the `public` directory so that IndexNow can verify that you own the website. + +If you do not want to configure your own key, you can simply use the `Key` included in this repository: + +```txt +888c64d8d7d9a2b605bcd5277021a414 +``` + +If you want to generate your own key, you can use: + +```bash +openssl rand -hex 16 +``` + +This will generate a random string. For example, if the output is `abcdefg123`, you need to save it as `public/abcdefg123.txt`, with the contents of the file also set to `abcdefg123`. diff --git a/docs/GithubActions.md b/docs/GithubActions.md index 35690a7..dac7583 100644 --- a/docs/GithubActions.md +++ b/docs/GithubActions.md @@ -88,10 +88,29 @@ PUBLIC_REMARK42_SITE_ID= 同样,在`Settings > Secrets and variables > Actions`中,添加四个`Repository variables`,分别为: -| 密钥名 | 内容 | -| ------------- | -------------------------------------------------------- | -| `DEPLOY_HOST` | 服务器IP地址,如`192.168.1.1` | -| `DEPLOY_PATH` | 在服务器上的部署路径,如`/www/wwwroot/blog.cloverta.top` | -| `DEPLOY_PORT` | 服务器SSH端口,一般是`22` | -| `DEPLOY_USER` | 登录用户,例如`root` | +| 密钥名 | 内容 | +| -------------- | ------------------------------------------------------------ | +| `DEPLOY_HOST` | 服务器IP地址,如`192.168.1.1` | +| `DEPLOY_PATH` | 在服务器上的部署路径,如`/www/wwwroot/blog.cloverta.top` | +| `DEPLOY_PORT` | 服务器SSH端口,一般是`22` | +| `DEPLOY_USER` | 登录用户,例如`root` | +| `INDEXNOW_KEY` | 提交至IndexNow的一串ID字符,可以直接填``888c64d8d7d9a2b605bcd5277021a414`` | +| `SITE_URL` | 你的域名,例如`https://blog.cloverta.top/`,注意结尾要带反斜杠 | +#### 关于`INDEXNOW_KEY` + +仓库的`Actions`会自动向 [Index Now](https://www.indexnow.org/) 推送更新,你需要在`public`目录下生成一个随机的key向Index Now证明这个网站是你的。 + +如果懒得配可以直接用这个仓库中的`Key` + +```txt +888c64d8d7d9a2b605bcd5277021a414 +``` + +如果你想生成一个自己的,你可以使用 + +```bash +openssl rand -hex 16 +``` + +生成一串随机字符,假设输出内容为`abcdefg123`,你需要将其保存到`public/abcdefg123.txt`,并且内容也为`abcdefg123`。