Skip to content

Create Serverless CMS Cookbook for Vue V3 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

orlyohreally
Copy link
Collaborator

A cookbook recipe on how to quickly build a CMS-powered blog with Vue.js and ButterCMS

@orlyohreally orlyohreally requested a review from courcelan July 7, 2021 11:27
@jakelumetta
Copy link

@orlyohreally Images are broken in the .md file: https://github.com/ButterCMS/docs/blob/ae8471f8d47b7c3937abec66144349094b8920d5/src/cookbook/serverless-blog.md

Let's make sure they are up to date images as well in terms of our new blog post editor UI. Can grab pictures from: https://buttercms.com/features/ if needed

@orlyohreally orlyohreally force-pushed the 1070-create-serverless-cms-cookbook-for-vue-v3-by-porting-our-current-one branch from ae8471f to f4049e7 Compare July 12, 2021 13:16
@orlyohreally
Copy link
Collaborator Author

orlyohreally commented Jul 12, 2021

@orlyohreally Images are broken in the .md file: https://github.com/ButterCMS/docs/blob/ae8471f8d47b7c3937abec66144349094b8920d5/src/cookbook/serverless-blog.md

Let's make sure they are up to date images as well in terms of our new blog post editor UI. Can grab pictures from: https://buttercms.com/features/ if needed

I have replaced the image with post editor UI with the one from the features page. I have checked and it seems that other recipes also have images not displaying when viewing .md files, but they work when you run the project

Copy link

@courcelan courcelan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some recommendations for stylistic updates.

Looks good otherwise!

</template>

<script>
import { butter } from "@/buttercms"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets move this down below import { RouterLink } as we are third-party and want to ensure that Vue is the prime import.

import { defineComponent, onMounted, ref, unref } from "vue"
import { RouterLink, useRoute } from "vue-router"

import { butter } from "@/buttercms.js"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets be consistent here and ensure this is import { butter } from "@/buttercms"

import { defineComponent, onMounted, ref, unref, watch } from "vue"
import { RouterLink, useRoute } from "vue-router"

import { butter } from "@/buttercms.js"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets be consistent here and ensure this is import { butter } from "@/buttercms"

const categories = await getCategories()
const postsByCategory = await getPostsByCategory( "example-category" )

console.log(categories, postsByCategory)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets remove the console.log unless we are describing why thats in the code. if it should remain, then lets do:

console.log({ categories, postsByCategory })

which will output:

{
  categories: [ ... ],
  postsByCategory: [ ... ]
}

this is easier in the console to tell what data you are looking at.

@orlyohreally orlyohreally force-pushed the 1070-create-serverless-cms-cookbook-for-vue-v3-by-porting-our-current-one branch from f4049e7 to 97b93ad Compare July 12, 2021 14:42
@orlyohreally orlyohreally requested a review from courcelan July 12, 2021 14:43
Copy link

@courcelan courcelan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from here.

@jakelumetta
Copy link

Awesome thanks @courcelan

@jakelumetta jakelumetta merged commit 0541d52 into ButterCMS:master Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants