feat: 调整页面顶部区域&重构项目页热力图&优化markdown内容页

This commit is contained in:
rbetree
2026-01-20 19:20:34 +08:00
parent 280d376bac
commit 1625f7342c
14 changed files with 807 additions and 92 deletions

View File

@@ -7,6 +7,7 @@ const {
} = require('../cache/articles');
const {
tryLoadProjectsRepoCache,
tryLoadProjectsHeatmapCache,
applyRepoMetaToCategories,
buildProjectsMeta,
} = require('../cache/projects');
@@ -61,6 +62,14 @@ function resolveTemplateName(pageId, data) {
function applyProjectsData(data, pageId, config) {
data.siteCardStyle = 'repo';
data.projectsMeta = buildProjectsMeta(config);
const heatmapCache = tryLoadProjectsHeatmapCache(pageId, config);
if (data.projectsMeta && data.projectsMeta.heatmap && heatmapCache) {
data.projectsMeta.heatmap.html = heatmapCache.html;
data.projectsMeta.heatmap.generatedAt = heatmapCache.meta.generatedAt;
data.projectsMeta.heatmap.sourceUrl = heatmapCache.meta.sourceUrl;
}
if (Array.isArray(data.categories)) {
const repoCache = tryLoadProjectsRepoCache(pageId, config);
if (repoCache && repoCache.map) {