Skip to content

Instantly share code, notes, and snippets.

@wesharehoodies wesharehoodies/index.vue
Last active Mar 14, 2019

Embed
What would you like to do?
<script>
import Prismic from "prismic-javascript";
import PrismicDom from "prismic-dom" //importing the Dom
import PrismicConfig from "./../prismic.config.js";
export default {
async asyncData() {
const api = await Prismic.getApi(PrismicConfig.apiEndpoint);
let blog_post = {};
const results = await api.query(
Prismic.Predicates.at("document.type", "blog-post"),
{ lang: "en-us" } //This is a Prismic query option
);
blog_post = results.results[0]
}
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.