feat: publish Git collaboration and AI development research
This commit is contained in:
@@ -6,15 +6,18 @@ interface Props {
|
||||
description?: string;
|
||||
canonical?: string;
|
||||
article?: boolean;
|
||||
image?: string;
|
||||
}
|
||||
|
||||
const {
|
||||
title = "K1412 Research",
|
||||
description = "技术研究、实验记录与可验证的公开成果。",
|
||||
canonical = Astro.url.href,
|
||||
article = false
|
||||
article = false,
|
||||
image = "/og-default.svg"
|
||||
} = Astro.props;
|
||||
const pageTitle = title === "K1412 Research" ? title : `${title} · K1412 Research`;
|
||||
const socialImage = new URL(image, Astro.site ?? Astro.url).href;
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
@@ -32,7 +35,11 @@ const pageTitle = title === "K1412 Research" ? title : `${title} · K1412 Resear
|
||||
<meta property="og:title" content={pageTitle} />
|
||||
<meta property="og:description" content={description} />
|
||||
<meta property="og:url" content={canonical} />
|
||||
<meta property="og:image" content="https://blog.k1412.top/og-default.svg" />
|
||||
<meta property="og:image" content={socialImage} />
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content={pageTitle} />
|
||||
<meta name="twitter:description" content={description} />
|
||||
<meta name="twitter:image" content={socialImage} />
|
||||
<title>{pageTitle}</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -10,13 +10,19 @@ export async function getStaticPaths() {
|
||||
interface Props { post: CollectionEntry<"posts"> }
|
||||
const { post } = Astro.props;
|
||||
const { Content, headings } = await render(post);
|
||||
const topicLabels: Record<string, string> = {
|
||||
"agent-systems": "Agent 系统",
|
||||
"llm-systems": "LLM 系统",
|
||||
"ai-research": "AI 研究",
|
||||
"research-method": "研究方法"
|
||||
};
|
||||
---
|
||||
|
||||
<BaseLayout title={post.data.title} description={post.data.summary} canonical={post.data.canonicalUrl} article>
|
||||
<BaseLayout title={post.data.title} description={post.data.summary} canonical={post.data.canonicalUrl} article image={post.data.preview}>
|
||||
<article class="article-page">
|
||||
<header class="article-header">
|
||||
<a class="back-link" href="/">← 返回研究索引</a>
|
||||
<div class="article-kicker"><span>{post.data.topic}</span><span>{post.data.date}</span><span>更新 {post.data.updated}</span></div>
|
||||
<div class="article-kicker"><span>{topicLabels[post.data.topic] ?? post.data.topic}</span><span>{post.data.date}</span><span>更新 {post.data.updated}</span></div>
|
||||
<h1>{post.data.title}</h1>
|
||||
<p>{post.data.summary}</p>
|
||||
<div class="tag-row">{post.data.tags.map((tag) => <span>{tag}</span>)}</div>
|
||||
|
||||
@@ -156,7 +156,7 @@ button, input { font: inherit; }
|
||||
.prose pre { overflow-x: auto; padding: 22px; border-radius: 2px; font-size: 13px; line-height: 1.6; }
|
||||
.prose code:not(pre code) { padding: .12em .35em; background: var(--paper-deep); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; }
|
||||
.prose table { width: 100%; margin: 2.2em 0; border-collapse: collapse; font-family: var(--sans); font-size: 13px; line-height: 1.55; }
|
||||
.prose th, .prose td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
|
||||
.prose th, .prose td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
|
||||
.prose th { color: var(--rust); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
|
||||
.prose img, .prose svg { width: min(1100px, calc(100vw - 48px)); max-width: none; margin: 2.6em 0 2.6em 50%; transform: translateX(-50%); }
|
||||
|
||||
@@ -213,13 +213,15 @@ button, input { font: inherit; }
|
||||
.method-steps section { min-height: 230px; padding: 28px; }
|
||||
.article-header { padding: 54px 0 64px; }
|
||||
.article-kicker { margin-top: 40px; }
|
||||
.article-header h1 { font-size: 48px; }
|
||||
.article-kicker { gap: 10px; font-size: 9px; letter-spacing: .11em; }
|
||||
.article-header h1 { font-size: clamp(38px, 11vw, 44px); line-height: 1.02; letter-spacing: -.035em; }
|
||||
.article-header > p { font-size: 17px; }
|
||||
.article-grid { padding-top: 48px; gap: 40px; }
|
||||
.article-outline ol { grid-template-columns: 1fr; }
|
||||
.prose { font-size: 17px; line-height: 1.85; }
|
||||
.prose h2 { font-size: 32px; }
|
||||
.prose table { display: block; overflow-x: auto; white-space: nowrap; }
|
||||
.prose table { display: block; overflow-x: auto; white-space: normal; font-size: 12px; }
|
||||
.prose th, .prose td { min-width: 112px; padding: 10px 8px; }
|
||||
.prose img, .prose svg { width: calc(100vw - 28px); }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user