Migrate content from markdown to Appwrite database
Remove static markdown file dependencies and update all pages/components to fetch data directly from Appwrite collections, while maintaining existing service functions for data retrieval and adding new CRUD operations for projects.
This commit is contained in:
1 parent
7e3b5b7a55
commit
03a79e2f79
18 files changed
+1990
-5876
No files matched your search
@@ -18,7 +18,7 @@ function mapAppwriteBlogToCollectionEntry(post: any): BlogCollectionEntry {
|
||||
return {
|
||||
id: post.$id,
|
||||
slug: post.$id, // Using ID as slug since we don't have a proper slug field
|
||||
body: post.content,
|
||||
body: post.contentHtml || post.content, // Use converted HTML content
|
||||
collection: "blog",
|
||||
data: {
|
||||
title: post.title,
|
||||
@@ -26,7 +26,7 @@ function mapAppwriteBlogToCollectionEntry(post: any): BlogCollectionEntry {
|
||||
date: new Date(post.date),
|
||||
tags: JSON.parse(post.tags),
|
||||
draft: post.draft,
|
||||
content: post.content
|
||||
content: post.contentHtml || post.content // Use converted HTML content
|
||||
},
|
||||
render: async () => {
|
||||
// This is a minimal implementation for the render function that matches the expected structure
|
||||
|
||||
Reference in new issue
Block a user