Update welcome post content and formatting; implement dynamic blog owner name in layout and post metadata; add author field to post structure and API routes.
This commit is contained in:
@@ -22,6 +22,7 @@ export async function POST(request: Request) {
|
||||
date,
|
||||
tags,
|
||||
summary,
|
||||
author: process.env.NEXT_PUBLIC_BLOG_OWNER + "'s" || 'Anonymous',
|
||||
});
|
||||
|
||||
// Write the file
|
||||
|
||||
@@ -44,6 +44,7 @@ export async function POST(request: Request) {
|
||||
date: data.date || new Date().toISOString().split('T')[0],
|
||||
tags: data.tags || [],
|
||||
summary: data.summary || '',
|
||||
author: process.env.NEXT_PUBLIC_BLOG_OWNER + "'s" || 'Anonymous',
|
||||
});
|
||||
} catch (error) {
|
||||
console.error('Error uploading file:', error);
|
||||
|
||||
Reference in New Issue
Block a user