Skip to content
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

fix(example): "head property in component must be a function" #7601

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
38 changes: 20 additions & 18 deletions examples/meta-info/pages/index.vue 100755 → 100644
@@ -1,30 +1,32 @@
<template>
<div class="container">
<h1>Home page 🚀</h1>
<NuxtLink to="/about">
About page
</NuxtLink>
<NuxtLink to="/about">About page</NuxtLink>
</div>
</template>

<script>
export default {
head: {
title: 'Home page 🚀',
meta: [
{ hid: 'description', name: 'description', content: 'Home page description' }
],
noscript: [
{ innerHTML: 'Body No Scripts', body: true }
],
script: [
{ src: '/head.js' },
// Supported since 1.0
{ src: '/body.js', body: true },
{ src: '/defer.js', defer: '' }
]
head() {
return {
title: "Home page 🚀",
meta: [
{
hid: "description",
name: "description",
content: "Home page description"
}
],
noscript: [{ innerHTML: "Body No Scripts", body: true }],
script: [
{ src: "/head.js" },
// Supported since 1.0
{ src: "/body.js", body: true },
{ src: "/defer.js", defer: "" }
]
};
}
}
};
</script>

<style>
Expand Down