{"id":43767318,"url":"https://github.com/dinhanhthi/dinhanhthi.com","last_synced_at":"2026-02-05T16:05:50.229Z","repository":{"id":38069786,"uuid":"182227195","full_name":"dinhanhthi/dinhanhthi.com","owner":"dinhanhthi","description":"🔥  My personal website for taking notes. It uses Next.js and Notion as CMS.","archived":false,"fork":false,"pushed_at":"2026-01-28T19:11:44.000Z","size":19264,"stargazers_count":85,"open_issues_count":1,"forks_count":26,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-01T13:47:27.692Z","etag":null,"topics":["dinhanhthi","nextjs","note-taking","notion-api","personal-website"],"latest_commit_sha":null,"homepage":"https://dinhanhthi.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dinhanhthi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"ko_fi":"dinhanhthi","custom":["paypal.me/DinhAnhThi","buymeacoffee.com/dinhanhthi"]}},"created_at":"2019-04-19T08:04:32.000Z","updated_at":"2026-01-22T14:27:16.000Z","dependencies_parsed_at":"2023-12-01T08:26:38.784Z","dependency_job_id":"60e45339-8aec-4ff6-8daa-00c20509ed9d","html_url":"https://github.com/dinhanhthi/dinhanhthi.com","commit_stats":null,"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"purl":"pkg:github/dinhanhthi/dinhanhthi.com","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinhanhthi%2Fdinhanhthi.com","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinhanhthi%2Fdinhanhthi.com/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinhanhthi%2Fdinhanhthi.com/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinhanhthi%2Fdinhanhthi.com/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dinhanhthi","download_url":"https://codeload.github.com/dinhanhthi/dinhanhthi.com/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinhanhthi%2Fdinhanhthi.com/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29125110,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T14:05:12.718Z","status":"ssl_error","status_checked_at":"2026-02-05T14:03:53.078Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dinhanhthi","nextjs","note-taking","notion-api","personal-website"],"created_at":"2026-02-05T16:05:50.166Z","updated_at":"2026-02-05T16:05:50.222Z","avatar_url":"https://github.com/dinhanhthi.png","language":"TypeScript","funding_links":["https://ko-fi.com/dinhanhthi","paypal.me/DinhAnhThi","buymeacoffee.com/dinhanhthi"],"categories":[],"sub_categories":[],"readme":"# dinhanhthi.com\n\nNext.js 15+ 🤝 Tailwind CSS v4 🤝 pnpm 🤝 Notion as CMS 🤝 Custom Notion Renderer 🤝 Redis Cache (Upstash).\n\n🎉 You can read [this post](https://dinhanhthi.com/note/how-i-create-this-site/) to understand the ideas behind and create your own a site like mine.\n\n🎊 What's new in v7? Check [this post](https://dinhanhthi.com/note/this-site-gets-updates).\n\n🧡 If what I do is helpful to you for some reason, please consider [supporting me](https://dinhanhthi.com/note/support-thi/). Thank you!\n\n## Previous versions\n\n👉 Version 1 (Jekyll): [v1.dinhanhthi.com](https://v1.dinhanhthi.com) -- [source](https://github.com/dinhanhthi/dinhanhthi.com-v1).\u003cbr /\u003e\n👉 Version 2 (Jekyll): [v2.dinhanhthi.com](https://v2.dinhanhthi.com) -- [source](https://github.com/dinhanhthi/dinhanhthi.com-v2).\u003cbr /\u003e\n👉 Version 3 (Jekyll): [v3.dinhanhthi.com](https://v3.dinhanhthi.com) -- [source](https://github.com/dinhanhthi/dinhanhthi.com-v3).\u003cbr /\u003e\n👉 Version 4 (Gatsby, canceled at 60%): [demo of what I did](https://v4.dinhanhthi.com) -- [source](https://github.com/dinhanhthi/dinhanhthi.com-v4-gatsby).\u003cbr /\u003e\n👉 Version 5 (11ty): [v5.dinhanhthi.com](https://v5.dinhanhthi.com) -- [source](https://github.com/dinhanhthi/dinhanhthi.com-v5).\u003cbr /\u003e\n👉 Version 6 (use separated [notion-x](https://github.com/dinhanhthi/notion-x) repo): [source](https://github.com/dinhanhthi/dinhanhthi.com/releases/tag/v6.8.0).\n\n## Dev\n\nYou have to install **globally** [Nodejs \u003e=22](https://nodejs.org/en) (recommend using [nvm](https://github.com/nvm-sh/nvm)) and [`pnpm`](https://pnpm.io/installation) first. Then \n\n```bash\n# Copy and fill all variables (1st time only)\ncp example.env.local .env.local\n\n# install (1st time only)\npnpm install\n\n# Turn off being collected data via Telemetry program\n# https://nextjs.org/telemetry\npnpm next telemetry disable\n\n# dev\npnpm run dev # port 3004\n\n# build\npnpm run build\n# If you have .env.production.local, it will be used for production build\n# Use below to get the latest .env.production.local\nvercel env pull .env.production.local --environment=production\n\n# serve (need to build first)\npnpm start # port 3004\n\n# reinstall all\npnpm run reinstall\n\n# clean\npnpm run clean\n\n# prettier\npnpm run prettier\n\n# clear pnpm cache (helpful sometimes)\npnpm store prune\n\n# cache management (requires Redis setup)\npnpm run warm-cache         \t\t\t\t# Populate Redis cache\npnpm run warm-cache --force \t\t\t\t# Force refresh cache (get latest data from Notion API)\npnpm run warm-cache --home --force \t# Force refresh cache for home page\n# There are other options: --notes, --tags, --tools, --single\npnpm run clear-cache --all  \t\t\t\t# Clear all cache\n```\n\n## Redis Cache Setup\n\nThis project uses **[Upstash Redis](https://upstash.com/)** with **Refresh-Ahead Pattern** for caching Notion API responses (Disable it with `DISABLE_REDIS_CACHE=\"false\"`). It makes sure that users always reach the content even when there are errors fetching from Notion API. **Cache Strategy**:\n\n- **Soft TTL**: When to refresh cache (background, non-blocking). The content will be updated when this time passes.\n- **Hard TTL**: When Redis deletes cache (X days = safety net). The content on the site wil always be alive within this time. We have TTL time to fix the problem with Notion API.\n\n```bash\nUPSTASH_REDIS_REST_URL=\"https://your-url.upstash.io\"\nUPSTASH_REDIS_REST_TOKEN=\"your-token\"\n\n# Optional: Disable Redis cache completely (useful for testing/development)\nDISABLE_REDIS_CACHE=\"false\"\n\nDISABLE_REDIS_CACHE=\"your-deploy-hook-secret\"\n```\n\n**Remark**: On Vercel, there is a deploy hook (need variable `DEPLOY_HOOK_SECRET`) to automatically run the things in `warm-cache` after each successfull deployment. You also need to add these variables in the Github Repository Secrets: `SITE_URL` (`https://dinhanhthi.com` for example) and `DEPLOY_HOOK_SECRET`\n\n**Useful commands**:\n\n```bash\npnpm run warm-cache         \t\t\t\t# Populate Redis cache\npnpm run warm-cache --force \t\t\t\t# Force refresh cache (get latest data from Notion API)\npnpm run warm-cache --home --force \t# Force refresh cache for home page \n# There are other options: --notes, --tags, --tools, --single\npnpm run clear-cache --all  \t\t\t\t# Clear all cache\npnpm run warm-cache --slug=my-note-slug           # Warm single note by slug\npnpm run warm-cache --slug=my-note-slug --force   # Force refresh single note\n```\n\n## Error Email Notifications (Resend)\n\nThis project uses **Resend** for email notifications when Notion API errors occur (Disable it with `DISABLE_ERROR_EMAILS=\"false\"`).\n\n```bash\nRESEND_API_KEY=\"re_xxxxxxxxxxxx\"\nADMIN_EMAIL=\"your-email@domain.com\"\n\n# Optional: Enable error emails in dev (default: disabled)\nSEND_ERROR_EMAILS_IN_DEV=\"false\"\n\n# Optional: Disable error emails completely (overrides all other settings)\nDISABLE_ERROR_EMAILS=\"false\"\n```\n\n## Vercel Setup\n\nThe project uses pnpm as the package manager. Vercel automatically detects this via the `packageManager` field in `package.json`. No additional configuration needed.\n\nYou have to add `ENABLE_EXPERIMENTAL_COREPACK` to `1` on Vercel.\n\n```bash\nvercel dev # like pnpm run dev\n\nvercel build\n\nvercel build --prod\n\n# preview only\nvercel deploy\n\n# production\nvercel --prod\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdinhanhthi%2Fdinhanhthi.com","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdinhanhthi%2Fdinhanhthi.com","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdinhanhthi%2Fdinhanhthi.com/lists"}