@@ -24,7 +24,7 @@ import {
2424export async function getStaticPaths() {
2525 const blogEntries = await getSortedPosts ();
2626 return blogEntries .map ((entry ) => ({
27- params: { slug: entry .slug },
27+ params: { slug: entry .id },
2828 props: { entry },
2929 }));
3030}
@@ -146,7 +146,7 @@ const jsonLd = [
146146 published ={ entry .data .published }
147147 updated ={ entry .data .updated }
148148 tags ={ entry .data .tags }
149- slug ={ entry .slug }
149+ slug ={ entry .id }
150150 ></PostMetadata >
151151 { ! entry .data .image && <div class = " border-[var(--line-divider)] border-dashed border-b-[1px] mb-5" ></div >}
152152 </div >
@@ -201,7 +201,7 @@ const jsonLd = [
201201 <div class = " flex-1" >
202202 <p class = " text-white/80 text-sm mb-1" >发现错误或想要改进这篇文章?</p >
203203 <a
204- href = { ` ${gitHubEditConfig .baseUrl }/${entry .slug }.md ` }
204+ href = { ` ${gitHubEditConfig .baseUrl }/${entry .id }.md ` }
205205 target = " _blank"
206206 rel = " noopener noreferrer"
207207 class = " inline-flex items-center gap-1 text-[var(--primary)] hover:text-[oklch(0.65_0.16_var(--hue))] text-sm font-medium transition-colors"
@@ -246,7 +246,7 @@ const jsonLd = [
246246 )}
247247 </div >
248248
249- { licenseConfig .enable && <License title = { entry .data .title } slug = { entry .slug } pubDate = { entry .data .published } class = " mb-6 rounded-xl license-container" ></License >}
249+ { licenseConfig .enable && <License title = { entry .data .title } slug = { entry .id } pubDate = { entry .data .published } class = " mb-6 rounded-xl license-container" ></License >}
250250
251251 <!-- Giscus 评论区 -->
252252 <div id =" giscus-container" class =" giscus" ></div >
0 commit comments