anzifan.com
anzifan.com copied to clipboard
Absolutely amazing !! It is so visually appealing✨. How do I test it on local.
I would like to test it on local.
Any .env? configs? notion template? This is a really amazing project. I really want to test and try new things with it so any help or guide will be amazing.
Hi, thank you for asking.
-
Please create a
.env.local
file, and add these variables:For starting the website and show the posts
Create a Internal Integration Token in your [Notion Developers integrations](https://www.notion.so/my- integrations), it should start with "secret_"
NOTION_KEY=secret_xxxxxxxxxx
For the PV/UV widget (Optional)
Find these variables in your Google Analytics (UA), check this article if you want to setup this.
GOOGLE_ANALYTICS_VIEW_ID= GOOGLE_CLIENT_EMAIL= GOOGLE_CLIENT_ID= GOOGLE_PRIVATE_KEY=
-
And you also need to change the
databaseId
inlib/notion.ts
to your own Notion database ID, for me is7fddb522451e4ac68922d1515da1f5f4
. Just see my Notion template here and you can easily get your ID from the url, don't forget to set the page public. -
Then just run
yarn install
andyarn dev
from the root directory in your terminal, everything should work now, enjoy.
Amazing !! thanks a lot. Btw, what about your old blog? https://anzifan-old.vercel.app/ Does it also uses notion? if yes can I check the source code? I want to learn how you made archive, labels section so a guide to the old one would really help.
Oh, my old blog was based on Hexo and React, it's a markdown static generation blog, not using Notion as database. And it's just a modification of icarus theme. Here is my source code. About the archive page, I have made a simple version without pagination (since I haven't had enough posts yet), you can check it here. Thank you very much for your appreciation. I will keep improving this project in the future.
@notionhq/client warn: request fail {
09:44:17.618 | code: 'object_not_found', 09:44:17.619 | message: 'Could not find database with ID: c66c8b23-98e3-4d4e-8991-5e897d98eb24. Make sure the relevant pages and databases are shared with your integration.' 09:44:17.619 | }
.env
NOTION_KEY=secret_gj8uYvvrUsIjqhAiqCOw5F3U6hJtwiqaJZeXKKmPeQ3
NOTION_DATABASE_ID=c66c8b2398e34d4e89915e897d98eb24
我也是一样,在部署vercel的时候报错
我也是一样,在部署vercel的时候报错
你需要添加环境变量,NOTION_KEY
NOTION_DATABASE_ID,这两个的环境变量添加到vercle的设置(项目的 设置)里面的环境变量中 另外需要注意的是
- 需要公开该页面
- 需要在页面中将你创建的那个notion api
我也是,在部署vercel的时候报错
你需要添加环境变量,NOTION_KEY
NOTION_DATABASE_ID,这两个环境变量到vercle的设置(的设置)里面的环境变量中另外 需要注意的是
- 需要公开该页面
- 需要在页面中将你创建的那个notion api
![]()
您好!我已添加环境变量,并且github仓库和notion页面均公开,并且add connection 了github,但是在构建vercel时,找不到 ID 的数据库
我也是,在部署vercel的时候报错
你需要添加环境变量,NOTION_KEY
NOTION_DATABASE_ID,这两个环境变量到vercle的设置(的设置)里面的环境变量中另外 需要注意的是
- 需要公开该页面
- 需要在页面中将你创建的那个notion api
![]()
您好!我已添加环境变量,并且github仓库和notion页面均公开,并且add connection 了github,但是在构建vercel时,找不到 ID 的数据库
这个我不太清楚,我的是可以的,你可以访问一下,我目前是在搞访问量但是英语不太好,上面一直没有成功。notion.tianzhongs.ml,你可以访问一下试试,我的部分还没有修改
Tz @.***
------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年10月5日(星期三) 晚上9:14 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [MannyCooper/anzifan.com] Absolutely amazing !! It is so visually appealing✨. How do I test it on local. (Issue #5)
我也是,在部署vercel的时候报错
你需要添加环境变量,NOTION_KEY
NOTION_DATABASE_ID,这两个环境变量到vercle的设置(的设置)里面的环境变量中另外 需要注意的是
需要公开该页面
需要在页面中将你创建的那个notion api
您好!我已添加环境变量,并且github仓库和notion页面均公开,并且add connection 了github,但是在构建vercel时,找不到 ID 的数据库
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
这个我不太清楚,我的是可以的,你可以访问一下,我目前是在搞访问量但是英语不太好,上面一直没有成功。notion.tianzhongs.ml,你可以访问一下试试,我的部分还没有修改 Tz @.*** … ------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年10月5日(星期三) 晚上9:14 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [MannyCooper/anzifan.com] Absolutely amazing !! It is so visually appealing✨. How do I test it on local. (Issue #5) 我也是,在部署vercel的时候报错 你需要添加环境变量,NOTION_KEY NOTION_DATABASE_ID,这两个环境变量到vercle的设置(的设置)里面的环境变量中另外 需要注意的是 需要公开该页面 需要在页面中将你创建的那个notion api 您好!我已添加环境变量,并且github仓库和notion页面均公开,并且add connection 了github,但是在构建vercel时,找不到 ID 的数据库 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
已经成功搭建~~感谢!,add connection to 要选择之前创建的api的选项即可
问下这个是只需要在notion上修改博客就会自动同步内容还是要自行配置
问下这个是只需要在notion上修改博客就会自动同步内容还是要自行配置
不会自动更新