midnight fixup
This commit is contained in:
parent
bb058426a9
commit
34ddae165b
11 changed files with 20 additions and 108 deletions
|
|
@ -10,7 +10,6 @@ const t = useTranslations(lang)
|
|||
const allPosts = await getPostsByLocale(lang)
|
||||
const posts = allPosts
|
||||
.slice(0, common.latestPosts)
|
||||
.filter((p) => p.data.published)
|
||||
---
|
||||
|
||||
<div class="my-8 text-xl font-medium md:my-8">
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
export const title = "你好,我是小孙同学~"
|
||||
|
||||
<h3 class="my-10 text-center text-xl font-bold">{title}</h3>
|
||||
|
||||
<img
|
||||
className="block dark:hidden"
|
||||
src="https://cdn.jsdelivr.net/gh/sun0225SUN/sun0225SUN/profile-snake-contrib/github-contribution-grid-snake.svg"
|
||||
/>
|
||||
<img
|
||||
className="hidden dark:block"
|
||||
src="https://cdn.jsdelivr.net/gh/sun0225SUN/sun0225SUN/profile-snake-contrib/github-contribution-grid-snake-dark.svg"
|
||||
/>
|
||||
|
|
@ -1,6 +1,15 @@
|
|||
export const age = new Date().getFullYear() - 2002
|
||||
|
||||
<p>
|
||||
they/them (er/ihm) ⋅ {age}yo digital sorcerer und pixel wizard ⋅ self-hoster ⋅
|
||||
liebt automation
|
||||
</p>
|
||||
they/them (er/ihm) ⋅ {age}yo ⋅ digital sorcerer und pixel wizard
|
||||
<br/>
|
||||
- coo @ [pyro]
|
||||
- schreibt texte @ [eurofurence]
|
||||
- ui @ [sofurry]
|
||||
<br/>
|
||||
meine professionelle arbeit findest du auf [datashard.work]
|
||||
|
||||
|
||||
[pyro]:https://pyro.host
|
||||
[eurofurence]:https://eurofurence.org
|
||||
[sofurry]:https://sofurry.com
|
||||
[datashard.work]:https://datashard.work
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
export const title = "我的链接"
|
||||
|
||||
<h3 class="my-10 text-center text-xl font-bold">{title}</h3>
|
||||
|
||||
```json
|
||||
name: "Guoqi Sun"
|
||||
description: "Try, fail, retry. That's the rhythm of growth."
|
||||
link: "https://blog.sunguoqi.com"
|
||||
avatar: "https://assets.guoqi.dev/images/avatar.png"
|
||||
```
|
||||
|
||||
<h4 class="my-10 text-center">
|
||||
想要添加友情链接?请按照如下格式在评论区留言,我会及时添加。
|
||||
</h4>
|
||||
|
||||
```json
|
||||
name: "your site name"
|
||||
description: "your site description"
|
||||
link: "your site link"
|
||||
avatar: "your site avatar"
|
||||
```
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
export const title = "Hello, I'm Guoqi Sun ~"
|
||||
|
||||
<h3 class="my-10 text-center text-xl font-bold">{title}</h3>
|
||||
|
||||
<img
|
||||
className="block dark:hidden"
|
||||
src="https://cdn.jsdelivr.net/gh/sun0225SUN/sun0225SUN/profile-snake-contrib/github-contribution-grid-snake.svg"
|
||||
/>
|
||||
<img
|
||||
className="hidden dark:block"
|
||||
src="https://cdn.jsdelivr.net/gh/sun0225SUN/sun0225SUN/profile-snake-contrib/github-contribution-grid-snake-dark.svg"
|
||||
/>
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
export const title = "My Link"
|
||||
|
||||
<h3 class="my-10 text-center text-xl font-bold">{title}</h3>
|
||||
|
||||
```js
|
||||
name: "Guoqi Sun",
|
||||
description: "Try, fail, retry. That's the rhythm of growth.",
|
||||
link: "https://blog.sunguoqi.com",
|
||||
avatar: "https://assets.guoqi.dev/images/avatar.png",
|
||||
```
|
||||
|
||||
<h4 class="my-10 text-center">
|
||||
Want to add a friend link? Please leave a comment in the comment area below,
|
||||
and I will add it as soon as possible.
|
||||
</h4>
|
||||
|
||||
```js
|
||||
name: "your site name",
|
||||
description: "your site description",
|
||||
link: "your site link",
|
||||
avatar: "your site avatar",
|
||||
```
|
||||
|
|
@ -11,9 +11,8 @@ import "~/styles/tailwind.css"
|
|||
const lang = getLangFromUrl(Astro.url)
|
||||
|
||||
const post = Astro.props.post
|
||||
|
||||
const urls = {
|
||||
postURL: `${Astro.url.pathname}/og.png`,
|
||||
postURL: `${Astro.url.pathname.replace(/\/$/, "")}/og.png`,
|
||||
general: `/images/general/ogImage.png`,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
---
|
||||
import { de, en } from "~/config"
|
||||
import AboutContentDe from "~/config/de/about.mdx"
|
||||
import AboutContentEn from "~/config/en/about.mdx"
|
||||
import { getLangFromUrl } from "~/i18n/utils"
|
||||
import MainLayout from "~/layouts/main.astro"
|
||||
import { getLanguagePaths } from "~/utils/langs"
|
||||
|
||||
export function getStaticPaths() {
|
||||
return getLanguagePaths()
|
||||
}
|
||||
|
||||
const lang = getLangFromUrl(Astro.url)
|
||||
const pageMeta = lang === "de" ? de.pageMeta : en.pageMeta
|
||||
const AboutContent = lang === "de" ? AboutContentDe : AboutContentEn
|
||||
---
|
||||
|
||||
<MainLayout
|
||||
title={pageMeta.about.title}
|
||||
description={pageMeta.about.description}
|
||||
ogImage={pageMeta.about.ogImage}
|
||||
needComment={true}
|
||||
>
|
||||
<div class="prose dark:prose-invert max-w-3xl">
|
||||
<AboutContent />
|
||||
</div>
|
||||
</MainLayout>
|
||||
|
|
@ -19,9 +19,7 @@ export async function GET(request: { url: URL }) {
|
|||
title: config.meta.title,
|
||||
description: config.meta.description,
|
||||
site:
|
||||
process.env.NODE_ENV === "development"
|
||||
? "http://localhost:4321"
|
||||
: config.meta.url,
|
||||
config.meta.url,
|
||||
items: posts.map((post: any) => ({
|
||||
title: post.data.title,
|
||||
description: post.data.description,
|
||||
|
|
|
|||
|
|
@ -10,9 +10,7 @@ export async function GET() {
|
|||
title: config.meta.title,
|
||||
description: config.meta.description,
|
||||
site:
|
||||
process.env.NODE_ENV === "development"
|
||||
? "http://localhost:4321"
|
||||
: config.meta.url,
|
||||
config.meta.url,
|
||||
items: posts.map((post: any) => ({
|
||||
title: post.data.title,
|
||||
description: post.data.description,
|
||||
|
|
|
|||
|
|
@ -34,10 +34,13 @@ export const getPostsByLocale = async (locale: string) => {
|
|||
? await getCollection("enPosts")
|
||||
: await getCollection("dePosts")
|
||||
// Add the locale to the data of each post
|
||||
|
||||
|
||||
posts.forEach((post: any) => {
|
||||
post.data.lang = locale
|
||||
})
|
||||
return posts.sort(
|
||||
const filtered = posts.filter(p => p.data.published)
|
||||
return filtered.sort(
|
||||
(a: any, b: any) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf(),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue