- {{ time }}
+ {{ date }}
diff --git a/content/blogs/1. hello-world.md b/content/blogs/1. hello-world.md
index 45319d5..18fb895 100644
--- a/content/blogs/1. hello-world.md
+++ b/content/blogs/1. hello-world.md
@@ -2,9 +2,9 @@
title: Lorem ipsum, dolor sit amet consectetur adipisicing elit. Aperiam incidunt
date: 1st Jan 2023
description: Lorem ipsum, dolor sit amet consectetur adipisicing elit. Aperiam incidunt, ipsa ea voluptatibus quas vitae dolorem officia vero rerum at atque non magni esse, enim ducimus asperiores numquam perspiciatis quaerat,
-image: https://res.cloudinary.com/dmecmyphj/image/upload/v1673372476/nuxt-blog/intro-to-ts-dmecmyphj_rox0jz.jpg
+image: /nuxt-blog/intro-to-ts-dmecmyphj_rox0jz.jpg
alt: Lorem ipsum, dolor sit amet consectetur adipisicing elit. Aperiam incidunt
-ogImage: https://res.cloudinary.com/dmecmyphj/image/upload/v1673372476/nuxt-blog/intro-to-ts-dmecmyphj_rox0jz.jpg
+ogImage: /nuxt-blog/intro-to-ts-dmecmyphj_rox0jz.jpg
provider: cloudinary
tags: ['nuxt', 'nuxt-content', 'vue', 'typescirpt']
published: true
diff --git a/nuxt.config.ts b/nuxt.config.ts
index 6686142..55704df 100644
--- a/nuxt.config.ts
+++ b/nuxt.config.ts
@@ -22,4 +22,10 @@ export default defineNuxtConfig({
theme: 'dracula',
},
},
+
+ image: {
+ cloudinary: {
+ baseURL: 'https://res.cloudinary.com/dmecmyphj/image/upload/v1673372476/',
+ },
+ },
})
diff --git a/pages/blogs/[blog].vue b/pages/blogs/[blog].vue
index f480e5c..88ef471 100644
--- a/pages/blogs/[blog].vue
+++ b/pages/blogs/[blog].vue
@@ -7,14 +7,10 @@ const data = computed
(() => {
return {
title: articles.title || 'no-title available',
description: articles.description || 'no-descriptoin available',
- image:
- articles.image ||
- 'https://res.cloudinary.com/dmecmyphj/image/upload/v1673378250/nuxt-blog/no-image_cyyits.png',
+ image: articles.image || '/nuxt-blog/no-image_cyyits.png',
alt: articles.alt || 'no alter data available',
- ogImage:
- articles.ogImage ||
- 'https://res.cloudinary.com/dmecmyphj/image/upload/v1673378250/nuxt-blog/no-image_cyyits.png',
- provider: articles.provider,
+ ogImage: articles.ogImage || '/nuxt-blog/no-image_cyyits.png',
+ provider: articles.provider || 'cloudinary',
date: articles.date || 'not-date-available',
tags: articles.tags || [],
published: articles.published || false,
@@ -27,6 +23,7 @@ const data = computed(() => {
{{ data.title || '' }}
queryContent('/blogs').sort({ _id: -1 }).find())
+
+const formatedData = computed(() => {
+ return data.value?.map((articles) => {
+ return {
+ path: articles._path,
+ title: articles.title || 'no-title available',
+ description: articles.description || 'no-descriptoin available',
+ image: articles.image || '/nuxt-blog/no-image_cyyits.png',
+ alt: articles.alt || 'no alter data available',
+ ogImage: articles.ogImage || '/nuxt-blog/no-image_cyyits.png',
+ provider: articles.provider,
+ date: articles.date || 'not-date-available',
+ tags: articles.tags || [],
+ published: articles.published || false,
+ }
+ })
+})
diff --git a/pages/categories/[category].vue b/pages/categories/[category].vue
index f58c02d..966bd0b 100644
--- a/pages/categories/[category].vue
+++ b/pages/categories/[category].vue
@@ -27,18 +27,40 @@ const { data } = await useAsyncData('home', () =>
.where({ tags: { $contains: category.value } })
.find()
)
+
+const formatedData = computed(() => {
+ return data.value?.map((articles) => {
+ return {
+ path: articles._path,
+ title: articles.title || 'no-title available',
+ description: articles.description || 'no-descriptoin available',
+ image: articles.image || '/nuxt-blog/no-image_cyyits.png',
+ alt: articles.alt || 'no alter data available',
+ ogImage: articles.ogImage || '/nuxt-blog/no-image_cyyits.png',
+ provider: articles.provider,
+ date: articles.date || 'not-date-available',
+ tags: articles.tags || [],
+ published: articles.published || false,
+ }
+ })
+})
-
+
diff --git a/pages/index.vue b/pages/index.vue
index f89e04c..bdb8d29 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -14,18 +14,40 @@ useHead({
const { data } = await useAsyncData('home', () =>
queryContent('/blogs').limit(6).sort({ _id: -1 }).find()
)
+
+const formatedData = computed(() => {
+ return data.value?.map((articles) => {
+ return {
+ path: articles._path,
+ title: articles.title || 'no-title available',
+ description: articles.description || 'no-descriptoin available',
+ image: articles.image || '/nuxt-blog/no-image_cyyits.png',
+ alt: articles.alt || 'no alter data available',
+ ogImage: articles.ogImage || '/nuxt-blog/no-image_cyyits.png',
+ provider: articles.provider,
+ date: articles.date || 'not-date-available',
+ tags: articles.tags || [],
+ published: articles.published || false,
+ }
+ })
+})
-
+
diff --git a/public/blogs/hello-man/cover.jpg b/public/blogs/hello-man/cover.jpg
deleted file mode 100644
index e5fc4f2..0000000
Binary files a/public/blogs/hello-man/cover.jpg and /dev/null differ
diff --git a/public/blogs/hello-world/cover.jpg b/public/blogs/hello-world/cover.jpg
deleted file mode 100644
index e5fc4f2..0000000
Binary files a/public/blogs/hello-world/cover.jpg and /dev/null differ
diff --git a/public/blogs/intro-to-nuxt/cover.jpg b/public/blogs/intro-to-nuxt/cover.jpg
deleted file mode 100644
index e5fc4f2..0000000
Binary files a/public/blogs/intro-to-nuxt/cover.jpg and /dev/null differ
diff --git a/public/blogs/intro-to-ts/cover.jpg b/public/blogs/intro-to-ts/cover.jpg
deleted file mode 100644
index e5fc4f2..0000000
Binary files a/public/blogs/intro-to-ts/cover.jpg and /dev/null differ
diff --git a/public/blogs/intro-to-vue/cover.jpg b/public/blogs/intro-to-vue/cover.jpg
deleted file mode 100644
index e5fc4f2..0000000
Binary files a/public/blogs/intro-to-vue/cover.jpg and /dev/null differ
diff --git a/public/img/favicon.ico b/public/favicon.ico
similarity index 100%
rename from public/img/favicon.ico
rename to public/favicon.ico
diff --git a/public/img/riyad.jpg b/public/img/riyad.jpg
deleted file mode 100644
index e5fc4f2..0000000
Binary files a/public/img/riyad.jpg and /dev/null differ