From 5f8aee27ff4a102682f3910ce8613b099f88e68d Mon Sep 17 00:00:00 2001 From: Oliver Larsson Date: Thu, 24 Oct 2024 13:52:08 +0200 Subject: [PATCH] External post item support --- components/PostListItem.vue | 9 +++++++-- content/testExternal.md | 11 +++++++++++ pages/index.vue | 2 +- 3 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 content/testExternal.md diff --git a/components/PostListItem.vue b/components/PostListItem.vue index 9d4d685..c58c87a 100644 --- a/components/PostListItem.vue +++ b/components/PostListItem.vue @@ -1,10 +1,15 @@ diff --git a/content/testExternal.md b/content/testExternal.md new file mode 100644 index 0000000..a58134e --- /dev/null +++ b/content/testExternal.md @@ -0,0 +1,11 @@ +--- +draft: true +date: 2022-01-03 +title: Test External +author: Oliver Larsson +description: +external: true +externalUrl: https://larssonoliver.com +language: Swedish +--- + diff --git a/pages/index.vue b/pages/index.vue index 114e6a1..35fdaa4 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -19,7 +19,7 @@ const page = ref(+(route.query.page || 1)); async function fetchData() { const { data } = await useAsyncData(() => { return queryContent() - .only(["title", "author", "date", "description", "_path"]) + .only(["title", "author", "date", "description", "_path", "external", "externalUrl", "language"]) .sort({ date: -1 }) .skip(pageSize * (page.value - 1)) .limit(pageSize)