Skip to content

Commit ca3e0e4

Browse files
committed
Merge branch 'main' of github.com:mk965/mengke.me into main
2 parents ea08015 + cde8b53 commit ca3e0e4

File tree

6 files changed

+26
-20
lines changed

6 files changed

+26
-20
lines changed

app/moment/page.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import React from 'react'
12
import { Container } from '~/components/ui/container'
23
import { PageHeader } from '~/components/ui/page-header'
34
import { Image, Zoom } from '~/components/ui/image'
@@ -40,7 +41,7 @@ interface Resource {
4041
}
4142

4243
async function fetchPublicMoment(): Promise<Moment[]> {
43-
const url = `${SITE_METADATA.momentApi}/api/v1/memos?visibility=PUBLIC`
44+
const url = `${SITE_METADATA.memosApi}/api/v1/memos?visibility=PUBLIC`
4445
if (!url) return []
4546
const res = await fetch(url, { next: { revalidate: 60 } })
4647
if (!res.ok) return []
@@ -56,13 +57,13 @@ function getResourceUrl(resource: Resource): string | null {
5657
// resource.name like: "resources/7JoNrgZzCgvtWeLVyjMpT6"
5758
const id = resource.name?.split('/')?.[1]
5859
if (!id) return null
59-
return `${SITE_METADATA.momentApi}/file/${resource.name}/${resource.filename}`
60+
return `${SITE_METADATA.memosApi}/file/${resource.name}/${resource.filename}`
6061
}
6162

6263
export default async function MomentPage() {
6364
const moments = await fetchPublicMoment()
6465

65-
if (!SITE_METADATA.momentApi) {
66+
if (!SITE_METADATA.memosApi) {
6667
return (
6768
<Container className="py-6">
6869
<PageHeader
@@ -246,7 +247,11 @@ function renderContent(moment: Moment) {
246247
)
247248
}
248249
if (node.type === 'LINE_BREAK') {
249-
return idx !== 0 && moment.nodes?.[idx - 1].type === 'LINE_BREAK' ? <br key={idx} /> : <></>
250+
return idx !== 0 && moment.nodes?.[idx - 1].type === 'LINE_BREAK' ? (
251+
<br key={`br_${idx}`} />
252+
) : (
253+
<React.Fragment key={`empty_${idx}`}></React.Fragment>
254+
)
250255
}
251256
return null
252257
})

components/home-page/links.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const LINKS = [
2222
emoji: 'dna',
2323
event: 'home-link-snippets',
2424
},
25-
...(SITE_METADATA.momentApi
25+
...(SITE_METADATA.memosApi
2626
? [{ title: `My moment`, href: `/moment`, emoji: 'snowboarder', event: 'home-link-moment' }]
2727
: []),
2828
{

data/authors/default.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,10 @@ _Jul 29, 2023 - now_
6565

6666
| date | desc |
6767
| ---------- | -------------------------------------------------------------------------------------- |
68+
| 2025.09.12 | <Twemoji emoji="snowboarder" /> Added [Moment](/moment) |
6869
| 2024.10.20 | <Twemoji emoji="fireworks" /> **Version 2.0** |
6970
| 2024.07.29 | 🎉 First Anniversary - [The year Mengke'blog was launched](/blog/202407/Blog_Timeline) |
70-
| 2024.05.03 | Added [Health Status](/status/health) |
71+
| 2024.05.03 | ~~Added [Health Status](/status/health)~~ |
7172
| 2023.11.20 | ~~Added Microsoft Clarity~~ |
7273
| 2023.10.25 | ~~Added [Gallery](/gallery)~~ |
7374
| 2023.08.06 | Added theme switch sound effects |

data/navigation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { SITE_METADATA } from './site-metadata'
33
export const HEADER_NAV_LINKS = [
44
{ href: '/blog', title: 'Blog', emoji: 'writing-hand' },
55
{ href: '/snippets', title: 'Snippets', emoji: 'dna' },
6-
...(SITE_METADATA.momentApi ? [{ href: '/moment', title: 'Moment', emoji: 'snowboarder' }] : []),
6+
...(SITE_METADATA.memosApi ? [{ href: '/moment', title: 'Moment', emoji: 'snowboarder' }] : []),
77
{ href: '/projects', title: 'Projects', emoji: 'man-technologist' },
88
{ href: '/about', title: 'About', emoji: 'smiling-face-with-sunglasses' },
99
]

data/site-metadata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const SITE_METADATA = {
3535
lang: 'en',
3636
},
3737
},
38-
momentApi: 'https://mengke.zeabur.app',
38+
memosApi: 'https://mengke.zeabur.app',
3939
search: {
4040
kbarConfigs: {
4141
// path to load documents to search

json/tag-data.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
"2023": 1,
33
"2024": 1,
44
"fe": 13,
5+
"javascript": 6,
6+
"flat": 1,
7+
"react": 3,
8+
"react-router-dom": 1,
59
"vue": 5,
610
"vue3": 2,
711
"deno": 1,
8-
"react": 3,
9-
"react-router-dom": 1,
10-
"javascript": 6,
11-
"flat": 1,
1212
"nextjs": 2,
1313
"database": 1,
1414
"mysql": 1,
@@ -26,12 +26,12 @@
2626
"effects-video": 1,
2727
"webgl": 2,
2828
"canvas": 2,
29-
"record-screen": 1,
30-
"html2canvas": 1,
3129
"video": 1,
3230
"android": 1,
3331
"webview": 2,
3432
"visualization": 1,
33+
"record-screen": 1,
34+
"html2canvas": 1,
3535
"life": 4,
3636
"year-end": 2,
3737
"summary": 2,
@@ -43,16 +43,16 @@
4343
"webworker": 1,
4444
"travel": 1,
4545
"japan": 1,
46-
"blog": 1,
47-
"code-life": 1,
4846
"ai": 4,
49-
"mcp": 3,
50-
"llm": 4,
51-
"harmonyos": 1,
52-
"app": 1,
5347
"deepseek": 1,
48+
"llm": 4,
5449
"ollama": 1,
5550
"dify": 1,
51+
"mcp": 3,
52+
"blog": 1,
53+
"code-life": 1,
54+
"harmonyos": 1,
55+
"app": 1,
5656
"typescript": 3,
5757
"string": 1,
5858
"casing": 1,

0 commit comments

Comments
 (0)