diff --git a/content b/content index 3c9a2a5..1918a51 160000 --- a/content +++ b/content @@ -1 +1 @@ -Subproject commit 3c9a2a5e85af0b5fe60f456da6eb84489589e384 +Subproject commit 1918a5114fc8557ddef594e8d135a0636c66853d diff --git a/src/routes/blog_index.js b/src/routes/blog_index.js index 51b50d4..d458fae 100644 --- a/src/routes/blog_index.js +++ b/src/routes/blog_index.js @@ -19,8 +19,9 @@ // Prepare context compatible with the blog-index.hbs layout // Add `templateContent` as excerpt or limited content if needed here // For now, use a simple excerpt from markdown or placeholder + console.log(publishedPosts); const posts = publishedPosts.map((post) => ({ - url: `/blog/${post.slug}`, + url: post.url, data: { title: post.title, date: post.date, diff --git a/src/services/postsMenuService.js b/src/services/postsMenuService.js index 49c7d86..dfcf0cb 100644 --- a/src/services/postsMenuService.js +++ b/src/services/postsMenuService.js @@ -19,6 +19,7 @@ } monthMap.get(post.month).push({ + url: post.url, slug: post.slug, title: post.title, date: post.date, diff --git a/src/utils/postFileUtils.js b/src/utils/postFileUtils.js index 3623487..49f3964 100644 --- a/src/utils/postFileUtils.js +++ b/src/utils/postFileUtils.js @@ -39,8 +39,10 @@ ) { return null; } + const url = `/blog/${yearDir.name}/${monthDir.name}/${slug}`; return { + url, slug, title: data.title || slug.replace(/-/g, " "), date: data.date || null, diff --git a/src/views/partials/postsMenu.handlebars b/src/views/partials/postsMenu.handlebars index 6942e59..2fbbc25 100644 --- a/src/views/partials/postsMenu.handlebars +++ b/src/views/partials/postsMenu.handlebars @@ -8,7 +8,7 @@