Enhance blog layout and functionality; add social links configuration in .env.local, implement search functionality in Home component, and improve post page styling.
This commit is contained in:
@@ -28,19 +28,9 @@ export async function POST(request: NextRequest) {
|
||||
// Construct the full path to the item
|
||||
let fullPath: string;
|
||||
if (type === 'post') {
|
||||
// For posts, we need to handle the .md extension
|
||||
if (itemPath) {
|
||||
fullPath = path.join(postsDir, itemPath, `${name}.md`);
|
||||
} else {
|
||||
fullPath = path.join(postsDir, `${name}.md`);
|
||||
}
|
||||
fullPath = path.join(postsDir, itemPath || '', `${name}.md`);
|
||||
} else {
|
||||
// For folders, we don't add the .md extension
|
||||
if (itemPath) {
|
||||
fullPath = path.join(postsDir, itemPath, name);
|
||||
} else {
|
||||
fullPath = path.join(postsDir, name);
|
||||
}
|
||||
fullPath = path.join(postsDir, itemPath || '', name);
|
||||
}
|
||||
|
||||
console.log('Attempting to delete:', {
|
||||
|
||||
Reference in New Issue
Block a user