Skip to content

Commit

Permalink
Merge pull request #107 from prose-im/master
Browse files Browse the repository at this point in the history
feat: set forced time in blog articles cause createdAt is filesystem …
  • Loading branch information
valeriansaliou authored Sep 30, 2023
2 parents d72d3ea + 0f7e132 commit 26f2036
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/components/section/blog/SectionBlogArticles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
slot="description"
)
time(
:datetime="article.createdAt"
:datetime="article.date"
)
| {{ $filters.formatDate(article.createdAt) }}
| {{ $filters.formatDate(article.date) }}
</template>

<!-- **********************************************************************
Expand Down
4 changes: 2 additions & 2 deletions src/components/section/blog/SectionBlogMain.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
| NEW

time(
:datetime="featured.createdAt"
:datetime="featured.date"
class="c-section-blog-main__featured-overline"
)
| {{ $filters.formatDate(featured.createdAt) }}
| {{ $filters.formatDate(featured.date) }}

h2.c-section-blog-main__featured-title.u-medium
| {{ featured.title }}
Expand Down
1 change: 1 addition & 0 deletions src/content/blog/introducing-prose.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: "Introducing Prose"
description: "Decentralized Team Messaging in an Era of Centralized SaaS"
date: 2023-05-27
cover:
src: "/blog/introducing-prose/prose-macos-login.jpg"
alt: "The prose welcome screen"
Expand Down
1 change: 1 addition & 0 deletions src/content/blog/why-prose-chose-swiftui.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: "Going Native: Why Prose chose SwiftUI"
description: "Building a native macOS app in a world of cross-platform frameworks"
date: 2023-06-10
cover:
src: "/blog/why-prose-chose-swiftui/swift-ui.webp"
alt: "Swift UI logo"
Expand Down
4 changes: 2 additions & 2 deletions src/pages/blog/_article.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
article
header.p-blog-article__header
time(
:datetime="page.createdAt"
:datetime="page.date"
class="p-blog-article__date u-medium"
)
| {{ $filters.formatDate(page.createdAt) }}
| {{ $filters.formatDate(page.date) }}

h1.p-blog-article__title.u-medium
| {{ page.title }}
Expand Down
8 changes: 4 additions & 4 deletions src/pages/blog/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ export default {
async asyncData({ $content }) {
const articles = await $content("blog")
.only(["title", "description", "date", "cover", "slug", "createdAt"])
.sortBy("createdAt", "desc")
.only(["title", "description", "date", "cover", "slug"])
.sortBy("date", "desc")
.skip(1)
.fetch();
const [featured] = await $content("blog")
.only(["title", "description", "date", "cover", "slug", "createdAt"])
.sortBy("createdAt", "desc")
.only(["title", "description", "date", "cover", "slug"])
.sortBy("date", "desc")
.limit(1)
.fetch();
Expand Down

0 comments on commit 26f2036

Please sign in to comment.