about summary refs log tree commit diff
path: root/pages/kronika
diff options
context:
space:
mode:
Diffstat (limited to 'pages/kronika')
-rw-r--r--pages/kronika/_year/_month/_day/_title/index.vue8
1 files changed, 4 insertions, 4 deletions
diff --git a/pages/kronika/_year/_month/_day/_title/index.vue b/pages/kronika/_year/_month/_day/_title/index.vue
index 1148f61..f4d5cc0 100644
--- a/pages/kronika/_year/_month/_day/_title/index.vue
+++ b/pages/kronika/_year/_month/_day/_title/index.vue
@@ -15,10 +15,10 @@
 <script>
 const md = require('markdown-it')()
 import frontmatter from 'front-matter'
+import { getPostAttributes } from '~/api/api'
 
 export default {
   async asyncData({ params }) {
-    console.log(params)
     const fileContent = await import(
       `~/content/wpisy/${params.year}/${params.month}/${
         params.day
@@ -27,12 +27,12 @@ export default {
 
     if (fileContent === undefined) return { notFound: true }
 
-    let post = frontmatter(fileContent.default)
-    console.log(post.attributes)
+    const post = getPostAttributes(fileContent.default)
+
     return {
       params,
       attributes: post.attributes,
-      content: md.render(post.body)
+      content: post.body
     }
   },
   data() {