about summary refs log tree commit diff
path: root/pages/kronika/_year/_month
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2019-10-12 16:54:05 +0200
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2019-10-12 16:54:05 +0200
commit5cfbd5b71d149419b0b80056e652ca94d26f1a95 (patch)
tree4f61dd2e8822cec3613c0ef7f17f694afc42182e /pages/kronika/_year/_month
parentd92f1a2a1bac3039434a16c504cc1d54c6d0409a (diff)
downloadpuszcza-5cfbd5b71d149419b0b80056e652ca94d26f1a95.tar.gz
puszcza-5cfbd5b71d149419b0b80056e652ca94d26f1a95.zip
Move to single api
Diffstat (limited to 'pages/kronika/_year/_month')
-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() {