-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(ja): translate guides/components-glossary/pages-head (#814)
* copy content/ja/guides/components-glossary/pages-head.md from en/ * translate content/ja/guides/components-glossary/pages-head.md into Japanese Co-authored-by: Debbie O'Brien <debs-obrien@users.noreply.github.com>
- Loading branch information
1 parent
cdac531
commit 417909c
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
title: 'head メソッド' | ||
description: Nuxt.js はアプリケーションの headers 及び html attributes を更新するために vue-meta を使います。 | ||
menu: head メソッド | ||
category: components-glossary | ||
--- | ||
|
||
> Nuxt.js はアプリケーションの `headers` 及び `html attributes` を更新するために [vue-meta](https://github.com/nuxt/vue-meta) を使います。 | ||
- **型:** `Object` または `Function` | ||
|
||
現在のページの HTML の head タグを設定するために `head` メソッドを使います。 | ||
|
||
```html | ||
<template> | ||
<h1>{{ title }}</h1> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
data() { | ||
return { | ||
title: 'Hello World!' | ||
} | ||
}, | ||
head() { | ||
return { | ||
title: this.title, | ||
meta: [ | ||
// `hid` は一意の識別子として使用されます。 `vmid` は動作しないので使わないでください。 | ||
{ | ||
hid: 'description', | ||
name: 'description', | ||
content: 'My custom description' | ||
} | ||
] | ||
} | ||
} | ||
} | ||
</script> | ||
``` |