{"id":48520013,"url":"https://github.com/mmm25002500/bitcoin-blog","last_synced_at":"2026-04-07T20:33:13.357Z","repository":{"id":217248580,"uuid":"738959271","full_name":"mmm25002500/bitcoin-blog","owner":"mmm25002500","description":"A Chinese blog website about bitcoin","archived":false,"fork":false,"pushed_at":"2026-03-06T09:56:23.000Z","size":3419,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-06T13:55:41.706Z","etag":null,"topics":["bitcoin","crypto","firebase","firebase-storage","firestore","nextjs","tailwindcss","typescript"],"latest_commit_sha":null,"homepage":"https://bitcoin.org.tw","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mmm25002500.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-01-04T12:53:44.000Z","updated_at":"2026-03-06T09:56:26.000Z","dependencies_parsed_at":"2024-01-18T08:07:48.671Z","dependency_job_id":"b4e14b93-cea0-4229-b771-bbdacb581850","html_url":"https://github.com/mmm25002500/bitcoin-blog","commit_stats":null,"previous_names":["mmm25002500/bitcoin-blog"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mmm25002500/bitcoin-blog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmm25002500%2Fbitcoin-blog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmm25002500%2Fbitcoin-blog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmm25002500%2Fbitcoin-blog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmm25002500%2Fbitcoin-blog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mmm25002500","download_url":"https://codeload.github.com/mmm25002500/bitcoin-blog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmm25002500%2Fbitcoin-blog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31528541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["bitcoin","crypto","firebase","firebase-storage","firestore","nextjs","tailwindcss","typescript"],"created_at":"2026-04-07T20:33:12.850Z","updated_at":"2026-04-07T20:33:13.350Z","avatar_url":"https://github.com/mmm25002500.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 比特幣中文部落格網站 - 文檔\n\n## Resources\n- **Framework**: Next.js 14 (Pages Router)\n- **Language**: TypeScript\n- **CSS**: Tailwind CSS, Material Tailwind\n- **MD**: MDX (next-mdx-remote)\n- **DB**: Supabase\n- **Deploy**: Vercel\n- **Data**: Blockchair (BTC Data)\n\n## 開發環境設定\n\n### Installation\n\n#### pnpm（Recommanded）\n```bash\npnpm install\n```\n\n#### or npm\n```bash\nnpm install\n```\n\n### env var\n建立 `.env.local` 檔案並設定以下變數：\n\n```env\nNEXT_PUBLIC_SUPABASE_URL=your_supabase_url\nNEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key\n```\n\n### Hot-Reloading\n\n```bash\npnpm dev\n# or\nnpm run dev\n```\n開發伺服器將在 `http://localhost:3000` 啟動。\n\n### Build\n```bash\npnpm build\n# or\nnpm run build\n```\n\n### Production\n\n```bash\npnpm start\n# or\nnpm start\n```\n\n## 內容管理\n### 文章與新聞（棄用）\n注意：本段已棄用，目前已更改為 DB 的方式擷取資料，也以使用 MD 而非 MDX。\n\n文章與新聞透過 Supabase 資料庫管理，並使用管理後台 (bitcoin-blog-admin) 進行上傳與編輯。\n\n文章元資料格式：\n```yaml\n---\ntitle: \"文章標題\"\ndescription: \"文章描述\"\ndate: \"YYYY-MM-DD HH:MM\"\ntags: [\"標籤1\", \"標籤2\"]\ntype: \"Post\" 或 \"News\"\nimg: \"/Author/作者ID/author.png\"\nimage: \"https://圖片網址/圖片.jpg\"\n---\n```\n\n### 作者設定（棄用）\n注意：本段已棄用，目前已更改為 DB 的方式擷取資料。\n\n編輯 `src/config/Author.json` 來新增或修改作者資訊：\n\n```json\n{\n  \"authorID\": {\n    \"fullname\": \"作者全名\",\n    \"name\": \"作者簡稱\",\n    \"img\": \"/Author/authorID/author.png\",\n    \"description\": \"作者簡介\"\n  }\n}\n```\n\n### 網站設定\n在 `src/config/SiteConfig.json` 中設定分頁與顯示數量：\n\n```json\n{\n  \"ArticlePostListMorePostPerclick\": 3,\n  \"ArticleNewsListMorePostPerclick\": 3,\n  \"HomePageNewsListPerpage\": 3,\n  \"NewsListAllPerpage\": 6,\n  \"PostListAllPerpage\": 6\n}\n```\n\n### SEO 設定\n\n編輯 `src/config/SEO.json` 來設定 SEO 相關資訊。\n\n## API 端點\n\n### 內部 API 路由\n\n所有 API 端點位於 `/api/` 路徑下，使用查詢參數傳遞資料。\n\n#### 文章相關 (Post)\n\n| API 端點 | 方法 | 查詢參數 | 說明 |\n|---------|------|---------|------|\n| `/api/Post/getPosts` | GET | - | 取得所有文章列表 |\n| `/api/Post/getPostByID` | GET | `id: string` | 根據 ID 取得單篇文章 |\n| `/api/Post/getPostsByUID` | GET | `uid: string` | 根據作者 UID 取得該作者的所有文章 |\n\n#### 新聞相關 (News)\n\n| API 端點 | 方法 | 查詢參數 | 說明 |\n|---------|------|---------|------|\n| `/api/News/getPosts` | GET | - | 取得所有新聞列表 |\n| `/api/News/getPostByID` | GET | `id: string` | 根據 ID 取得單則新聞 |\n| `/api/News/getPostsByUID` | GET | `uid: string` | 根據作者 UID 取得該作者的所有新聞 |\n\n#### 通用文章 API\n\n| API 端點 | 方法 | 查詢參數 | 說明 |\n|---------|------|---------|------|\n| `/api/getArticleByFilename` | GET | `filename: string` | 根據檔案名取得文章資訊與連結 |\n| `/api/getArticleMarkdown` | GET | `userID: string, postID: string` | 從 Supabase 取得文章的 Markdown 內容 |\n| `/api/getPostsByFilter` | GET | `type: string, author: string, tag: string, mode: string` | 根據類型、作者、標籤篩選文章 |\n| `/api/getRelatedPosts` | GET | `tag: string, exclude: string, mode: string` | 取得相關文章（根據標籤） |\n| `/api/getMoreInfo` | GET | - | 取得首頁「更多資訊」區塊的文章列表 |\n\n#### 作者相關\n\n| API 端點 | 方法 | 查詢參數 | 說明 |\n|---------|------|---------|------|\n| `/api/author/getAuthor` | GET | - | 取得所有作者列表 |\n| `/api/author/getAuthorByUID` | GET | `uid: string` | 根據 UID 取得特定作者資訊 |\n| `/api/getAuthorPostCount` | GET | `author: string` | 取得特定作者的文章數量 |\n| `/api/getAuthorsByDescription` | GET | `text: string` | 根據描述搜尋作者 |\n\n#### 標籤相關 (Tags)\n\n| API 端點 | 方法 | 查詢參數 | 說明 |\n|---------|------|---------|------|\n| `/api/tags/getAllTags` | GET | - | 取得所有標籤（Post + News） |\n| `/api/tags/Posts/getTags` | GET | - | 取得文章標籤列表 |\n| `/api/tags/News/getTags` | GET | - | 取得新聞標籤列表 |\n\n#### 類型相關 (Types)\n\n| API 端點 | 方法 | 查詢參數 | 說明 |\n|---------|------|---------|------|\n| `/api/types/getAllTypes` | GET | - | 取得所有類型 |\n| `/api/types/Posts/getTypes` | GET | - | 取得文章類型列表 |\n| `/api/types/News/getTypes` | GET | - | 取得新聞類型列表 |\n\n#### 其他\n\n| API 端點 | 方法 | 查詢參數 | 說明 |\n|---------|------|---------|------|\n| `/api/getBitcoinStats` | GET | - | 從 Blockchair API 取得比特幣統計資料 |\n\n### 外部 API\n\n專案使用 [Blockchair API](https://blockchair.com/) 取得比特幣即時資料：\n- 雜湊率 (Hash Rate)\n- 區塊高度 (Block Height)\n- 價格 (Price)\n\n## 主要功能\n\n### 頁面路由\n\n| 路由 | 說明 |\n|-----|------|\n| `/` | 首頁 |\n| `/Post/[id]` | 文章內頁 |\n| `/News/[id]` | 新聞內頁 |\n| `/Author/[userID]` | 作者頁面 |\n| `/Search` | 搜尋頁面 |\n| `/Search/[tab]/[items]` | 搜尋結果頁面 |\n| `/Tag/[tab]/[items]` | 標籤篩選頁面 |\n| `/aboutus` | 關於我們 |\n| `/PrivacyPolicy` | 隱私權政策 |\n| `/Disclaimer` | 免責聲明 |\n| `/supporter` | 支持者頁面 |\n\n### 搜尋功能\n\n- **作者搜尋 (Creators)**: 使用純文字搜尋作者描述\n- **文章搜尋 (Posts)**: 使用標籤篩選文章\n- **新聞搜尋 (News)**: 使用標籤篩選新聞\n\n### 側邊欄與導航欄\n\n- 側邊欄 (Sidebar) 與導航欄 (Navbar) 的按鈕是獨立設定的\n- 修改時需要分別調整兩者的設定\n\n### 文章自動跳轉\n\n- 如果文章只有 News 類型，訪問 Post 頁面時會自動跳轉到 News 頁面\n- 如果文章只有 Post 類型，訪問 News 頁面時會自動跳轉到 Post 頁面\n\n## 部署\n\n### 使用 Vercel 部署\n\n1. 將專案推送到 GitHub\n2. 在 Vercel 建立新專案並連結 GitHub 儲存庫\n3. 設定環境變數（SUPABASE_URL, SUPABASE_ANON_KEY）\n4. 部署\n\n### 環境變數設定\n\n在 Vercel 或本地環境中設定以下變數：\n\n```\nNEXT_PUBLIC_SUPABASE_URL=your_supabase_url\nNEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key\n```\n\n## 開發注意事項\n\n### Markdown 語法\n\n在 MDX 檔案中使用 HTML 標籤時，class 屬性必須改用 `className`。\n\n### 時區設定\n\n文章列表的時間顯示使用 UTC+8 時區。\n\n### 工具指令\n\n擷取所有文章標籤（用於產生標籤列表）：\n\n```bash\ngrep -r 'tags' . | sed -n 's/.*tags: \\(.*\\)/\\1/p' | tr -d '[]' | tr ',' '\\n' | sed 's/^ *//;s/ *$//' | tr -d '\"' | tr -d \"'\" | sort -u | uniq | sed 's/^/\"/;s/$/\"/' | sed 's/$/,/'\n```\n\n## 授權\n\n本專案為私有專案。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmm25002500%2Fbitcoin-blog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmm25002500%2Fbitcoin-blog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmm25002500%2Fbitcoin-blog/lists"}