diff --git a/frontend/pages/PostPage.vue b/frontend/pages/PostPage.vue index 49d54d3..bc24208 100644 --- a/frontend/pages/PostPage.vue +++ b/frontend/pages/PostPage.vue @@ -5,7 +5,8 @@

{{ post.date }} by {{ post.author }}

-
+
+

@@ -19,7 +20,9 @@ import { humanReadableDate } from "@/utils"; export default { data() { return { + markdown: undefined, post: { + id: 1, title: "Building (another) NAS.", date: humanReadableDate(new Date()), author: "Kevin", @@ -32,6 +35,16 @@ A lot has changed in my life over the last 6 months or so, moving out of my flat

Join me on my newest endeavour to build a new NAS, or don’t of course.

` } } + }, + created() { + this.fetchMarkdown(); + }, + methods: { + fetchMarkdown() { + fetch(`/api/post/${this.post.id}/render`) + .then(resp => resp.json()) + .then(response => this.markdown = response.markdown) + } } }