Skip to content

Commit 229876a

Browse files
committed
fix: mismatched titles and geneneration logic
1 parent 6ab5866 commit 229876a

File tree

7 files changed

+10
-18
lines changed

7 files changed

+10
-18
lines changed

scripts/writer.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,18 @@ def beautify_string(text):
132132

133133
lines = iter(article.splitlines())
134134
markdown_file = ""
135-
author = random.choice(["杨其臻", "杨子凡", "叶家炜", "黄京"])
135+
author = random.choice(["杨其臻", "杨子凡", "叶家炜", "黄京", "王思成", "黄梓淳", "马浩琨", "杨岢瑞", "李睿远"])
136136
print(f" Rolled author: {author}")
137137

138138
for line in lines:
139139
if line.startswith("# "):
140-
title = line[1:].strip().split(":")[0]
140+
# Sometimes the LLM does not produce a top-level title
141+
# So we simply use the aforementioned topic instead
142+
# title = line[1:].strip().split(":")[0]
141143

142144
metadata = "\n".join([
143145
"---",
144-
f'title: "{title}"',
146+
f'title: "{topic}"',
145147
f'author: "{author}"',
146148
f'date: "{datetime.datetime.now().strftime("%b %d, %Y")}"',
147149
f'description: "{summary_result}"',

src/content/blog/2025-06-20/index.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/content/blog/2025-06-29/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "深入浅出"
2+
title: "基于 eBPF 的高性能网络监控实践"
33
author: "杨其臻"
44
date: "Jun 29, 2025"
55
description: "基于 eBPF 的高性能网络监控实践"

src/content/blog/2025-07-11/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "从理论到落地"
2+
title: "强化学习智能代理开发全流程解析"
33
author: "叶家炜"
44
date: "Jul 11, 2025"
55
description: "强化学习智能代理开发全流程解析"

src/content/blog/2025-07-16/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "引言"
2+
title: "图数据结构基础与核心操作详解"
33
author: "杨子凡"
44
date: "Jul 16, 2025"
55
description: "图数据结构基础与核心操作详解"

src/content/blog/2025-07-18/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "深入浅出"
2+
title: "数据库索引实现原理与优化技巧"
33
author: "杨子凡"
44
date: "Jul 18, 2025"
55
description: "深入解析数据库索引实现原理与优化技巧"

src/content/blog/2025-08-01/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "一、引言"
2+
title: "深入理解并实现基本的图着色(Graph Coloring)算法"
33
author: "杨其臻"
44
date: "Aug 01, 2025"
55
description: "探索图着色问题的核心算法与应用"

0 commit comments

Comments
 (0)