-
Typescript
-
-
+
+
+
+
+
+ {{ title }}
+
+
+
+
{{ date }}
+
|
+
{{ type }}
+
+
diff --git a/components/ArchivePostCard.vue b/components/ArchivePostCard.vue
deleted file mode 100644
index a56cf85..0000000
--- a/components/ArchivePostCard.vue
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
- This is a archive post link
-
-
-
-
-
-
diff --git a/pages/archive.vue b/pages/archive.vue
index 3d730be..a7dcd4e 100644
--- a/pages/archive.vue
+++ b/pages/archive.vue
@@ -2,16 +2,44 @@
definePageMeta({
layout: "list",
});
+
const { data } = await useAsyncData("home", () => queryContent("/").find());
+
+const getAllPost = computed(() => {
+ const allpost = data.value || [];
+ const alltypes = allpost.map((post) => {
+ return {
+ title: post.title,
+ path: post._path,
+ date: post.date as string,
+ type: post.type,
+ };
+ });
+ alltypes.sort(function (a, b) {
+ const c = new Date(a.date);
+ const d = new Date(b.date);
+ return c < d ? 1 : -1;
+ });
+ return alltypes;
+});
-
+
- ALL CONTENTS
+ ALL BLOG POST