anzifan.com icon indicating copy to clipboard operation
anzifan.com copied to clipboard

Absolutely amazing !! It is so visually appealing✨. How do I test it on local.

Open animemandir opened this issue 2 years ago • 12 comments

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.

animemandir avatar Aug 16 '22 10:08 animemandir

Hi, thank you for asking.

  1. 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=
    
  2. And you also need to change the databaseId in lib/notion.ts to your own Notion database ID, for me is 7fddb522451e4ac68922d1515da1f5f4. Just see my Notion template here and you can easily get your ID from the url, don't forget to set the page public.

  3. Then just run yarn install and yarn dev from the root directory in your terminal, everything should work now, enjoy.

MannyCooper avatar Aug 16 '22 15:08 MannyCooper

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.

animemandir avatar Aug 17 '22 04:08 animemandir

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.

MannyCooper avatar Aug 17 '22 19:08 MannyCooper

@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

animemandir avatar Aug 21 '22 04:08 animemandir

我也是一样,在部署vercel的时候报错

44maker avatar Oct 04 '22 02:10 44maker

我也是一样,在部署vercel的时候报错

你需要添加环境变量,NOTION_KEY

NOTION_DATABASE_ID,这两个的环境变量添加到vercle的设置(项目的 设置)里面的环境变量中 另外需要注意的是

  1. 需要公开该页面
  2. 需要在页面中将你创建的那个notion api image

songshua295 avatar Oct 04 '22 12:10 songshua295

我也是,在部署vercel的时候报错

你需要添加环境变量,NOTION_KEY

NOTION_DATABASE_ID,这两个环境变量到vercle的设置(的设置)里面的环境变量中另外 需要注意的是

  1. 需要公开该页面
  2. 需要在页面中将你创建的那个notion api 图片

您好!我已添加环境变量,并且github仓库和notion页面均公开,并且add connection 了github,但是在构建vercel时,找不到 ID 的数据库

44maker avatar Oct 05 '22 13:10 44maker

我也是,在部署vercel的时候报错

你需要添加环境变量,NOTION_KEY

NOTION_DATABASE_ID,这两个环境变量到vercle的设置(的设置)里面的环境变量中另外 需要注意的是

  1. 需要公开该页面
  2. 需要在页面中将你创建的那个notion api 图片

您好!我已添加环境变量,并且github仓库和notion页面均公开,并且add connection 了github,但是在构建vercel时,找不到 ID 的数据库

44maker avatar Oct 05 '22 13:10 44maker

这个我不太清楚,我的是可以的,你可以访问一下,我目前是在搞访问量但是英语不太好,上面一直没有成功。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: @.***>

songshua295 avatar Oct 05 '22 13:10 songshua295

这个我不太清楚,我的是可以的,你可以访问一下,我目前是在搞访问量但是英语不太好,上面一直没有成功。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的选项即可

44maker avatar Oct 05 '22 13:10 44maker

问下这个是只需要在notion上修改博客就会自动同步内容还是要自行配置

telegalaxy avatar May 13 '23 07:05 telegalaxy

问下这个是只需要在notion上修改博客就会自动同步内容还是要自行配置

不会自动更新

JIeJaitt avatar Aug 04 '23 17:08 JIeJaitt