diff options
author | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2019-10-12 16:54:05 +0200 |
---|---|---|
committer | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2019-10-12 16:54:05 +0200 |
commit | 5cfbd5b71d149419b0b80056e652ca94d26f1a95 (patch) | |
tree | 4f61dd2e8822cec3613c0ef7f17f694afc42182e /pages/kronika/_year/_month | |
parent | d92f1a2a1bac3039434a16c504cc1d54c6d0409a (diff) | |
download | puszcza-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.vue | 8 |
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() { |