feat: add gitea sync and env-aware content sync
This commit is contained in:
@@ -43,7 +43,7 @@ const isPlaceholder = activity.source === 'placeholder';
|
||||
: '这里展示构建阶段同步下来的 Gitea 热力图与最近活动摘要。'}
|
||||
</p>
|
||||
</div>
|
||||
<a class="section-link" href={site.gitea.baseUrl} target="_blank" rel="noreferrer">
|
||||
<a class="section-link" href={site.gitea.url} target="_blank" rel="noreferrer">
|
||||
打开 Gitea
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
---
|
||||
import { site } from '../config';
|
||||
|
||||
interface Props {
|
||||
name: string;
|
||||
description: string;
|
||||
@@ -23,7 +25,7 @@ const {
|
||||
downloadLink = '',
|
||||
} = Astro.props;
|
||||
|
||||
const fallbackRepoUrl = repo ? `https://gitea.sepcomet.xyz/${repo}` : '';
|
||||
const fallbackRepoUrl = repo ? `${site.gitea.url}/${repo}` : '';
|
||||
const resolvedRepoUrl = repoUrl || fallbackRepoUrl;
|
||||
---
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ const sortedLogs = logs.sort((a, b) => b.data.date.getTime() - a.data.date.getTi
|
||||
const latestLogs = sortedLogs.slice(0, 3);
|
||||
const featuredProjects = projects.filter((project) => project.featured).slice(0, 3);
|
||||
const latestLog = latestLogs[0];
|
||||
const activeRepo = activity.recent[0]?.repo ?? featuredProjects[0]?.gitea_repo ?? 'sepcomet/personal-homepage';
|
||||
const activeRepo = activity.recent[0]?.repo ?? featuredProjects[0]?.gitea_repo ?? `${site.gitea.username}/personal-homepage`;
|
||||
---
|
||||
|
||||
<Layout title={`${site.name} | ${site.title}`} description={site.description} currentPath="/">
|
||||
|
||||
Reference in New Issue
Block a user