初步
This commit is contained in:
1 parent
1a862adddc
commit
7c3679e885
41 files changed
+10544
-163
No files matched your search
@@ -0,0 +1,21 @@
|
||||
---
|
||||
import type { BlogPost } from '@/lib/posts';
|
||||
|
||||
interface Props {
|
||||
post: BlogPost;
|
||||
}
|
||||
|
||||
const { post } = Astro.props;
|
||||
---
|
||||
|
||||
<article class="post-card">
|
||||
<a href={post.href}>
|
||||
<time datetime={post.date.toISOString()}>{post.dateText}</time>
|
||||
<h2>{post.title}</h2>
|
||||
{post.summary && <p>{post.summary}</p>}
|
||||
</a>
|
||||
<div class="meta-list">
|
||||
{post.categories.map((category) => <a href={`/categories/${encodeURIComponent(category)}/`}>{category}</a>)}
|
||||
{post.tags.map((tag) => <a href={`/tags/${encodeURIComponent(tag)}/`}>#{tag}</a>)}
|
||||
</div>
|
||||
</article>
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
/// <reference path="../.astro/types.d.ts" />
|
||||
/// <reference types="astro/client" />
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
import '../styles/site.css';
|
||||
|
||||
interface Props {
|
||||
title?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
const siteTitle = "Bi's Blog";
|
||||
const { title = siteTitle, description = 'Personal blog by biss.' } = Astro.props;
|
||||
const pageTitle = title === siteTitle ? siteTitle : `${title} | ${siteTitle}`;
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="description" content={description} />
|
||||
<link rel="icon" href="/images/Bi.ico" />
|
||||
<title>{pageTitle}</title>
|
||||
</head>
|
||||
<body>
|
||||
<header class="site-header">
|
||||
<nav class="nav">
|
||||
<a class="brand" href="/">Bi's Blog</a>
|
||||
<div class="nav-links">
|
||||
<a href="/archives/">归档</a>
|
||||
<a href="/categories/">分类</a>
|
||||
<a href="/tags/">标签</a>
|
||||
<a href="/about/">关于</a>
|
||||
<a href="/link/">友链</a>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
<slot />
|
||||
</main>
|
||||
<footer class="site-footer">
|
||||
<span>© {new Date().getFullYear()} Bi's Blog</span>
|
||||
<a href="/rss.xml">RSS</a>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
Loaded 3 of 41 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user