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:
2025-06-18 19:27:05 +02:00
parent fcec794f13
commit c4af151d6c
5 changed files with 175 additions and 136 deletions

View File

@@ -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:', {