{!doctype html} 知識庫與精選書籤・呂亮進

知識庫與精選書籤

2022/03 ~ NOW

專案持續維護中

[Notion As DB 實驗專案] 基於 Notion API, Cloudflare Pages 所打造的靜態網頁流程


# 網站架設 # Notion # 靜態網頁
Cover Image

採用技術

Notion

網頁資料庫

App Script

定時觸發自動化部署

Cloudflare Pages

靜態網頁部署

工作流程

步驟ㄧ:建置 Notion 資料庫

建立 Notion 資料庫,並設定 API 權限

步驟二:於Cloudflare Page透過 Python 腳本連線 Notion 生成 html

先使用 Request 從 Notion API 取得資料,之後生成靜態網頁

步驟三:部署html靜態網頁

透過 Cloudflare Pages 部署靜態網頁並綁定網域

背景任務:每 20 分鐘透過Cloudflare Hook執行生成腳本

處理圖片路徑更新限制