From 808e89b024bed961cecd06c9e987dd0349458b92 Mon Sep 17 00:00:00 2001
From: Andrew Lee <alee14498@protonmail.com>
Date: Fri, 1 May 2020 13:44:35 -0400
Subject: Finally implemented blog posts

---
 pages/blog/_blog.vue | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 pages/blog/_blog.vue

(limited to 'pages/blog/_blog.vue')

diff --git a/pages/blog/_blog.vue b/pages/blog/_blog.vue
new file mode 100644
index 0000000..3f328eb
--- /dev/null
+++ b/pages/blog/_blog.vue
@@ -0,0 +1,33 @@
+<template>
+    <v-container>
+        <v-card>
+            <v-card-title>{{blogPost.title}}</v-card-title>
+            <v-card-subtitle>{{blogPost.description}}</v-card-subtitle>
+            <v-card-text :to="'/blog'">Back to posts</v-card-text>
+            <v-divider/>
+            <br/>
+            <v-card-text v-html="$md.render(blogPost.body)" />
+        </v-card>
+    </v-container>
+</template>
+
+<script>
+export default {
+  name: '_blog',
+  head: {
+    title: '{{blogpost.title}}'
+  },
+  async asyncData ({ params, payload }) {
+    if (payload) return { blogPost: payload }
+    else {
+      return {
+        blogPost: await require(`~/assets/content/blog/${params.blog}.json`)
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>
-- 
cgit v1.2.3

