mirror of
https://github.com/Ad-closeNN/blog-fuwari.git
synced 2026-05-31 01:40:03 -04:00
style(friends): 为友链卡片加入动画效果
2. chore(config): 更改 API 调用链接,从 Netlify Function 改为 GitHub API 3. GitHub Card 中头像 URL avatars.githubusercontent.com 改为 EdgeOne CDN 链接 avatars.gh.api.adclosenn.dev
This commit is contained in:
@@ -45,16 +45,17 @@
|
||||
statsElement.textContent = 'Err. invalid domain name';
|
||||
}
|
||||
// 第一步:调用 API
|
||||
const githubResponse = await fetch(`https://api.adclosenn.top/.netlify/functions/commit`);
|
||||
const githubResponse = await fetch(`https://api.github.com/repos/Ad-closeNN/blog-fuwari/commits?per_page=1`);
|
||||
|
||||
if (!githubResponse.ok) {
|
||||
throw new Error('获取信息失败');
|
||||
}
|
||||
|
||||
const Data = await githubResponse.json();
|
||||
let Data = await githubResponse.json();
|
||||
Data = Data[0];
|
||||
|
||||
// 第二步:获取 Commit 数据
|
||||
const latestCommit = Data
|
||||
const latestCommit = Data;
|
||||
|
||||
const commitData = {
|
||||
hash: latestCommit.sha.slice(0, 7),
|
||||
|
||||
Reference in New Issue
Block a user