Last active
October 15, 2019 11:06
-
-
Save egoist/93542976d72464caf7be5fc70216017b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div>{{ page.profile.name }}</div> | |
</template> | |
<script> | |
export default { | |
props: ['page'] | |
} | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.onCreatePages = async function() { | |
const profile = await fetchProfileFromApi() | |
// e.g. { name: 'egoist' } | |
await this.pages.createPage({ | |
profile, | |
permalink: '/profile', | |
slug: 'profile', | |
layout: 'profile', // use `layouts/profile.vue` | |
internal: { | |
id: 'unique id' | |
} | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://saber.land/docs/page-interface.html
https://saber.land/docs/saber-instance.html#oncreatepages