- 在寫 Markdown 要使用 HTML 語法的 class的時候要使用 className。
- 按鈕部分與 Sidebar 是分開的,如果要設定,要兩個都設定。
- 文章路徑為
Article/${name}/${mdx name}
- 文章元標頭為:
title: "文章標題"
description: "文章描述"
date: "YYYY-MM-DD HH:MM"
tags: ["標籤1", "標籤2", "標籤n"]
type: ['News','Post'] (類別:文章為Post,新聞為 News)
img: "/Author/JohnCarter/author.png"(必須放在本地,其位置於public/Author/${name}/author.png
)
image: "https://網址/圖片檔名.副檔名"
位置:WebsiteArticle/About.mdx
位置:WebsiteArticle/PrivacyPolicy.mdx
位置:WebsiteArticle/Disclaimer.mdx
- Creators 以純文字搜索。
- Posters 及 News 以標籤方式搜索。
- 如想更改 More Posts 一次點擊出現多少文章,則需更改
src/config/SiteConfig.json
中的PostListAllPerpage
。
- 如果該文章只有 News 而沒有 Post 則跳轉到新聞頁面。
- 如想更改 More Posts 一次點擊出現多少文章,則需更改
src/config/SiteConfig.json
中的ArticlePostListMorePostPerclick
。 - 底部 More Posts 會根據標籤進行查詢,只要本文標籤有的,其他文章有的,都會被篩選出,另外排除掉重複的。
- 如想更改 More Posts 一次點擊出現多少文章,則需更改
src/config/SiteConfig.json
中的NewsListAllPerpage
。
- 如果該文章只有 Post 而沒有 News 則跳轉到文章頁面
- 如想更改一次點擊出現多少文章,則需更改
src/config/SiteConfig.json
中的ArticleNewsListMorePostPerclick
。 - 底部 More Posts 會根據標籤進行查詢,只要本文標籤有的,其他文章有的,都會被篩選出,另外排除掉重複的。
- 跟 Navbar 是獨立的按鈕,需分開設定。
- 採用 Firebase Storage 存放,並在後端抓下來。
- 透過 API 從 Firebase 抓文章下來。
- 設定檔放在
/src/config/SEO.json
。
/src/config/Author.json
的id
務必與/src/Articles/${USERNAME}
一致。
路徑:/api/{name}?lebel_1=val_1&label2=val_2&...
API | Input | Output | 簡介 |
---|---|---|---|
getArticleLinkByFilename | req.query: { filename: string } | res: { title: string, authorData: { fullname?: string, name?: string, img?: string, description?: string, id: string }, date: string, description: string, link: string } | 根據檔案名取得文章的相關鏈接和信息 |
getMoreInfo | NONE | res: { category: string, post: { title: string, filename: string, description?: string, link: string, authorData: { fullname: string, name: string, img: string, description: string, id: string }, date: string }[] }[] | 根據 MoreInfo.json 中的信息取得更多文章的元數據 |
getPostsByFilter | req.query: { type: string, author: string, tag: string, mode: string } | res: { title: string, authorData: { fullname?: string, name?: string, img?: string, description?: string, id: string }, date: string, description: string, link: string }[] | 根據篩選條件取得符合條件的文章 |
getRelatedPosts | req.query: { tag: string, exclude: string, mode: string } | res: { title: string, authorData: { id: string }, date: string, description: string, link: string }[] | 根據標籤和排除的文章 ID 取得相關文章 |
getAuthorPostCount | req.query: { author: string<> } | res: { author: string, postCount: number } | 根據作者ID回傳該作者的文章數量 |
getAuthorsByDescription | req.query: { text: string } | res: { fullname: string, name: string, description: string, image: string, id: string }[] | 根據描述字段中的文本篩選作者 |
getBitcoinStats | NONE | JSON 格式的比特幣統計資料 | 使用 Blockchair API 取得比特幣統計資料並回傳 |
getAuthorConfig | NONE | res: { [authorID: string]: { fullname: string, name: string, img: string, description: string } } | 取得所有作者的設定信息 |
getArticleMarkdown | req.query: { userID: string, postID: string } | res: { content: string, data: { [key: string]: any } } | 根據用戶ID和文章ID取得文章的Markdown內容 |
Hash Rate | Block Height | Price |
---|---|---|
BlockChair | BlockChair | BlockChair |
內容 | 服務 |
---|---|
Post Backend | Firebase |
Backend Server | Vercel |
Frontend Server | Vercel |
BTC info Provider | BlockChair |
grep -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/$/,/'
# install necessary pkg
pnpm i
# hot reloading dev
pnpm dev
# deploy & compile
pnpm build
# install necessary pkg
npm i
# hot reloading dev
npm run dev
# deploy & compile
npm run build
# install necessary pkg
yarn
# hot reloading dev
yarn dev
# deploy & compile
yarn build