mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-07-09 22:42:19 +08:00
feat: |Doc| add Google ads doc (#598)
This commit is contained in:
@@ -151,6 +151,7 @@ function sidebarGuide(): DefaultTheme.SidebarItem[] {
|
||||
{ text: '新建邮箱地址 API', link: 'feature/new-address-api' },
|
||||
{ text: 'Oauth2 第三方登录', link: 'feature/user-oauth2' },
|
||||
{ text: '配置其他worker增强', link: 'feature/another-worker-enhanced' },
|
||||
{ text: '给网页增加 Google Ads', link: 'feature/google-ads.md' },
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ cp .env.example .env.prod
|
||||
|
||||
```bash
|
||||
pnpm build --emptyOutDir
|
||||
# 根据提示创建 pages
|
||||
# 第一次部署会提示创建项目, production 分支请填写 production
|
||||
pnpm run deploy
|
||||
```
|
||||
|
||||
|
||||
29
vitepress-docs/docs/zh/guide/feature/google-ads.md
Normal file
29
vitepress-docs/docs/zh/guide/feature/google-ads.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# 给网页增加 Google Ads
|
||||
|
||||
## 命令行部署
|
||||
|
||||
修改 `.env.prod` 文件
|
||||
|
||||
增加下列两个变量, 具体的值请参考 [Google AdSense](https://www.google.com/adsense/start/) 的说明
|
||||
|
||||
```txt
|
||||
VITE_GOOGLE_AD_CLIENT=ca-pub-123456
|
||||
VITE_GOOGLE_AD_SLOT=123456
|
||||
```
|
||||
|
||||
然后执行下列命令, 重新部署 pages 即可.
|
||||
|
||||
```bash
|
||||
pnpm build --emptyOutDir
|
||||
# 第一次部署会提示创建项目, production 分支请填写 production
|
||||
pnpm run deploy
|
||||
```
|
||||
|
||||
## GitHub Action 部署
|
||||
|
||||
修改 `FRONTEND_ENV`, 增加下列两个变量, 具体的值请参考 [Google AdSense](https://www.google.com/adsense/start/) 的说明, 重新部署 pages 即可.
|
||||
|
||||
```txt
|
||||
VITE_GOOGLE_AD_CLIENT=ca-pub-123456
|
||||
VITE_GOOGLE_AD_SLOT=123456
|
||||
```
|
||||
Reference in New Issue
Block a user