NotionNext部署-CloudFlare
category
技术工具
tags
NotionNext
建站
type
Post
slug
notion-next-cloud-flare
summary
cloudflare支持纯静态导出的notionnext,兼容性不那么好,但不失为一种选择。
status
Published
date
Mar 13, 2023
icon
password

前言

参考haixin的文章《NotionNext建站-cloudflare版》,这里做了优化
部署效果预览
CloudFlare版本是静态导出的,不支持实时更新文章,每次需要手动部署。

开始

访问CloudFlarePage
 

创建项目

notion image
  1. 直接连接git
    1. notion image
  1. 导入项目
    1. notion image
3.选择分支(作废)
分支选择 deploy/cloudflare-support :在4.0.9之后的版本中,可以直接使用main分支部署,无需切换分支
notion image

配置参数

来到页面下方的构建设置:
  • 构建命令填
    • npm run export
  • 输出根目录 out
notion image

环境变量

配置效果如下
notion image
配置说明
最后点击保存并部署即可。

完成部署

页面中心会显示您的访问域名
notion image

绑定域名

项目主页找到自定义域,找到下方设置自定义域
notion image
填写域名并继续
notion image
按照要求在域名服务商后台配置一个CNAME转发
notion image
  • CNAME转发示例
    • notion image
  • 点击下方的激活域,由于我使用的域名商本身就是cloudflare,故此步骤只需几秒即可完成验证。
    • notion image
  • NotionNext
  • 建站
  • ChatGPT4与GPT3的区别?GPT4有更好用吗?NotionNext二级菜单使用说明