jdan/notes là dự án mã nguồn mở trên GitHub với 80 sao, viết chủ yếu bằng TypeScript. Static site generator from a Notion DB
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Add a column called Filename to set each page's output filename. One page must use index.html.
Share that database with your new integration
Build and serve the site:
git clone https://github.com/jdan/notes.git
cd notes
npm install
NOTION_SECRET=[your token here] NOTION_DATABASE_ID=[your id here] TWITTER_HANDLE=yourHandle npm run build
BUILD=build npm run serve
# http://localhost:3000
The generated HTML and assets are written to build/ by default.
Configuration
Configuration is provided via environment variables, a .env file, or a config file in the .env format. To specify a config file, set the CONFIG=path/to/your/file.env env var. Here's an example:
npm install
npm run lint
npm run typecheck
npm test
Build with npm run build. For refactors that should not alter generated pages, use npm run build:compare-fresh to compare a fresh build with the current deployment output without modifying build/.
Notes deployment
The notes deployment has two roles:
Hetzner runs this app as a Docker container behind the existing kamal-proxy. It receives the protected Notion webhook, runs builds, and keeps a local generated copy in /opt/notes/site.
Cloudflare Pages serves the public static site at the edge. After a successful webhook build, the Hetzner container deploys /opt/notes/site to Cloudflare Pages when Cloudflare env vars are configured.
Runtime state on Hetzner:
/opt/notes/.env # NOTION_* config and WEBHOOK_SECRET
/opt/notes/site # generated static site
/opt/notes/data # sqlite cache
The Notion button should request the Hetzner webhook hostname, not the public Cloudflare Pages hostname:
When you click Publish, Notion requests https://hooks.jordanscales.com/webhook/notion?secret=<WEBHOOK_SECRET>. That hostname points to the Hetzner server, where kamal-proxy terminates and routes the request to the notes Docker container.
server.ts authenticates the request using either the secret query parameter or the x-webhook-secret header. Invalid requests return 401; valid requests start a build and immediately return a JSON response indicating that the build has started.
The container runs the normal build entrypoint, tsx index.ts. The build reads Notion using NOTION_SECRET and NOTION_DATABASE_ID, uses the SQLite cache at /data/db.sqlite3, and writes static HTML and assets into /app/site. On the Hetzner host, that directory is backed by /opt/notes/site.
After the build succeeds, server.ts deploys /app/site to Cloudflare Pages with Wrangler when CLOUDFLARE_PAGES_PROJECT_NAME is configured. Wrangler uses the Cloudflare values in /opt/notes/.env, including CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_PAGES_PROJECT_NAME, and CLOUDFLARE_PAGES_BRANCH.
Cloudflare creates a new Pages deployment for the notes project. Since deployments use branch main, Cloudflare treats the deployment as production and serves it through the custom domain notes.jordanscales.com.
Readers visiting https://notes.jordanscales.com/ hit Cloudflare Pages, not Hetzner. The Hetzner container still keeps and can serve a local generated copy as a fallback, but the intended public browsing path is Cloudflare edge.
Cloudflare Pages setup
Install dependencies locally if needed:
npm install
Log in with Wrangler and create the Pages project once:
If the project already exists, skip the create command. The project name can be anything, but it must match CLOUDFLARE_PAGES_PROJECT_NAME below.
Create a Cloudflare API token for Hetzner. It needs permission to deploy Pages for the account. Use the narrowest token Cloudflare allows for Pages deployments; if account selection is ambiguous, also set CLOUDFLARE_ACCOUNT_ID.
Add these values to /opt/notes/.env on Hetzner:
CLOUDFLARE_API_TOKEN=<cloudflare-api-token>
CLOUDFLARE_ACCOUNT_ID=<cloudflare-account-id> # optional unless Wrangler needs it
CLOUDFLARE_PAGES_PROJECT_NAME=notes
CLOUDFLARE_PAGES_BRANCH=main
Manual deploy from an already-built local build/ directory:
CLOUDFLARE_PAGES_PROJECT_NAME=notes npm run deploy:cloudflare
Manual deploy from Hetzner's generated site directory:
To deploy source changes to the running notes service:
npm run deploy:notes
The deploy script syncs source to /opt/notes, preserves remote .env, rebuilds the Docker image, restarts the notes container, and re-registers the route with kamal-proxy. It excludes the local, gitignored build/ directory. Set NOTES_WEBHOOK_HOST when deploying if the Hetzner route should use a hostname other than notes.jordanscales.com.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/jdan/notes là nguồn chính thức.
jdan/notes có những chủ đề gì?
GitHub topics của jdan/notes: "notion", "notion-api". TopGit xếp repo vào nhóm mã nguồn mở.
jdan/notes có phải mã nguồn mở không?
Có — jdan/notes phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/jdan/notes.
jdan/notes có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho jdan/notes. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
jdan/notes còn đang phát triển không?
Commit gần nhất trên jdan/notes là 8 ngày trước (theo timestamp GitHub). Repo có 9 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
jdan/notes dùng license gì?
jdan/notes phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về notes?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về notes.