0
0

More than 3 years have passed since last update.

【Nuxt.js】Nuxt文法編:head

Posted at

🎈 この記事はWP専用です
https://wp.me/pc9NHC-BC

前置き

metaタグを設定するhead属性について解説していきます🎀
SEOに直接的な影響はないと言われていますが、
検索結果のタイトル下に表示されるmeta descriptionは
クリック率に影響するため理解しておいた方がGood🌟

それではやっていきましょう〜!

head

head属性とは

前置きにも書きましたが、
metaタグを設定する場所です🎀🧸

公式:
https://ja.nuxtjs.org/guide/views/#%E3%83%9A%E3%83%BC%E3%82%B8

基本的にはnuxt.config.jsで
グローバルに設定しますが
pageごとのローカル設定を
優先させることもできます🌟

pageで個別の設定しなければ
nuxt.config.jsの設定が引き継がれます。

headに使えるオプションと使い方

head で利用できるオプションは数種類あります。
メタ情報プロパティの認識

主に使うのがtitleやmeta descriptionですね。
descriptionは検索結果の下に出る文章のことです。
https://wacul-ai.com/blog/seo/internal-seo/meta-description-for-seo/

【コード(htmlの場合)】

index.html
<head>
 <title>ここにタイトル</title>
 <meta name="description" content="Webサイトの概要">
</head>

【コード(Nuxtの場合)】

🎈 続きはWPでご覧ください👀
https://wp.me/pc9NHC-BC

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0