Notion页面+自定义域名低成本制作个人网站
Lazy loaded imageNotion页面+自定义域名低成本制作个人网站
type
status
date
slug
summary
tags
category
icon
password

一、域名获取

1.1 免费域名

可以参考:

1.2 付费域名

付费域名的教程网上很多,自己找一找

二、Notion页面设置

  • 选择你要分享出去的页面,打开“Share to web”,页面的一些设置根据需要调整(以后你随时可以修改),我这里是全部关闭了。
  • 然后“Copy link”复制链接出来备用。
 
notion image

三、转移到Cloudflare和部署

3.1 Cloudflare注册

进入Cloudflare官网,输入邮箱密码进行注册登陆。

3.2 添加站点、添加DNS解析记录

点击添加站点,输入自己的域名后,点击添加站点
notion image
然后跳转到这个界面,选择“Free”,点击“继续”
notion image
然后跳转到这个界面,点击“添加记录”
notion image
类别选择“CNAME”IPv4地址固定填写“notion.so”
notion image
名称参考以下规则,自己按需填写
输入@可以理解为空白,就是原始域名,我的就是xiaoyanggao.top
输入其他,可以理解为前缀,相当于子域名,***.xiaoyanggao.top
(如果写了www,每次访问一定要加上https://www.前缀,所以你只想要简简单单最原始的域名访问地址就直接填@
notion image
 
点击继续后会出现以下界面,复制两个Cloudflare 名称服务器
notion image

3.3 eu.org域名DNS转移

我是用免费域名,就以此为例。登录https://nic.eu.org/,选中要设置的域名,点击Nameservers
notion image
将上面复制的两个Cloudflare 名称服务器添加进去,点击Submit
notion image
过几分钟后,主页会显示绑定成功(邮件也会通知)
notion image

3.4 配置Workers

回到Cloudflare,点击添加好的域名,点击“Workers路由”后点击“管理Wokers
notion image
点击创建应用程序
notion image
点击“创建Woker
notion image
名称可以用Notion1以方便辨认,点击部署
notion image

3.5 使用网站生成Workers代码

打开这个网站https://fruition-stephenou.vercel.ap(国外网站,需要科学上网)
第一行:自己的域名(如果一开始添加DNS记录你有加前缀就要加上,没有就默认原始域名)
第二行:Notion分享页面链接
下面已经生成代码,点击“COPIED!”(复制)
notion image

3.6 Workers编辑代码

回到Cloudflare,点击“Workers和Pages”,进入notion1
notion image
点击“快速编辑”
notion image
左侧代码区块,Ctrl+A全选删除,刚才复制好的代码Ctrl+V粘贴,然后点击“保存并部署”
notion image

3.7 添加路由,完成部署

进入添加好的域名,点击Workers路由,点击添加路由
notion image
路由:[前缀].域名.com/*(斜杠/ 星号必须要写)
服务:选创建的Workers服务名称(我上面提到的“notion”
环境:环境选production
点击保存
notion image

参考:

 
AI画图软件PS AI中文版、永久免费使用免费eu.org域名获取
Loading...